Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

WIP: react-hooks v3 main branch #68

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft

WIP: react-hooks v3 main branch #68

wants to merge 61 commits into from

Conversation

ttypic
Copy link
Collaborator

@ttypic ttypic commented Aug 10, 2023

No description provided.

stmoreau and others added 30 commits July 19, 2023 15:54
Add eslint and prettier config and CI steps
adds an ably context provider which makes an ably client available via a
useAbly hook. the hook is used by useChannel and usePresence instead of
the existing `configureAbly` and `provideAbly` functions. in order to
properly support multiple clients (and potentially nested <AblyProvider>s), an
optional string id prop is available to set ids which can be passed to
useChannel, usePresence, and useAbly to specify a particular client/context.
feat!: add `<AblyProvider>` and `useAbly`
this functionality is covered by the listener hooks and it's
straightforward enough to get the same behaviour by just updating a
`useState` inside the listener function so i'm removing these for now
just for simplicity.
gives the user full control over whether their component re-renders
…hannelState

feat: add `useChannelStateListener` and `useConnectionStateListener` hooks
# Conflicts:
#	src/AblyReactHooks.ts
#	src/hooks/usePresence.ts
update `integration/v3` branch with the most recent commits from `main`
These are outdated since the new way to provide a realtime client to the
library is by using the `AblyProvider` component
docs: update contribution guide link
ttypic and others added 30 commits August 15, 2023 12:04
* removed `eslint-config-airbnb`
* added recommended rules for `react-hooks`
* turned on all recommended rules, except `@typescript-eslint/no-explicit-any` and `prefer-spread` (those require some additional refactoring)
chore(eslint): ESLint linting improvements
docs: remove outdated docs for passing in realtime instance
feat!: add React 16.8+ support for the library
fix: using stale version of message callback for `useChannel` hook
…ions

fix: make AblyProvider work with options parameter
fix: use fully qualified imports with `.js` extension for ESM build
[SDK-3801] feat: skip param for usePresence and useChannel
docs: document requirement for client side rendering
[SDK-3784] docs: add migration guide
[SDK-3797] feat: send agent with `/time` request upon init
feat: allow useChannel without message callback
[SDK-3777] feat: ably-js peerDependency
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants