Releases: Jdyn/use-phoenix
v0.0.3
What's Changed
- fix(presence): fix presence not synchronizing states properly by @timadevelop in #7
New Contributors
- @timadevelop made their first contribution in #7
Full Changelog: v0.0.2...v0.0.3
0.0.2
Full Changelog: v0.0.1...v0.0.2
2024-4-5
Breaking changes
-
before a channel connects,
data
is nowundefined
rather thannull
-
basic
useEvent
data cachingThe last response from any
useEvent
is cached across all instances. This means that if if you recieve any event for a channel topic, and for example theuseEvent
hook unmounts, once it remounts, it will instantly load the last recieved data and state for the givenevent
.Previously if you recieved an event and the hook unmounted and remounted, the data stored in the
useEvent
hook was lost and you have needed to recieve the event again to get the data back.Once you leave a channel using
leave()
all cached data for theuseEvent
will be cleared.
Additional changes
-
useChannel
now accepts apassive
optionpassive
will instruct the channel to wait for another instance ofuseChannel
to connect with the necessary params and then once a connection is made, thepassive
channel will connect itself. See the js docs for more information.