Skip to content

Updating state based on subscription results #1446

Answered by kitten
Kingdutch asked this question in Q&A
Discussion options

You must be logged in to vote

Why don't you just keep the current notification in the hook's state and use an effect to update a separate store?

This way you can build up an index of notifications completely separately from the subscription's state

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Kingdutch
Comment options

Answer selected by Kingdutch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants