knocklabs / javascript

Official JavaScript packages for interacting with Knock
https://knock.app/
MIT License
14 stars 3 forks source link

fix: subscribe to state updates for notifications #131

Closed kylemcd closed 4 months ago

kylemcd commented 4 months ago

In react strict mode, updates from useNotifications was not persisted downstream, so the UI seemed unresponsive as it wasn't getting updates. There is likely an underlying issue that we need to investigate further, but using zustand's transient updates pattern seems to work for both react strict mode and a production build.

linear[bot] commented 4 months ago

KNO-5922 react sdk issues with next 14 & react strict mode

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
javascript-slack-connect-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 9:16pm
javascript-slack-kit-example ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 9:16pm
changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: 78d79b06a7c2658257db056d12d1b740fa2c2685

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages | Name | Type | | ------------------------------- | ----- | | @knocklabs/react-core | Patch | | @knocklabs/react-native | Patch | | @knocklabs/react | Patch | | @knocklabs/react-native-example | Patch | | nextjs-example | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR