Skip to content

Commit

Permalink
fix: prop updates work now
Browse files Browse the repository at this point in the history
  • Loading branch information
petyosi committed Jan 5, 2024
1 parent 8840399 commit b5b329c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/RealmWithPlugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ export function RealmWithPlugins({ children, plugins }: { children: React.ReactN
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

for (const plugin of plugins) {
plugin.update?.(theRealm)
}
React.useEffect(() => {
for (const plugin of plugins) {
plugin.update?.(theRealm)
}
})

return <RealmContext.Provider value={theRealm}>{children}</RealmContext.Provider>
}

0 comments on commit b5b329c

Please sign in to comment.