Skip to content

[SSR] Use Recoil as state management #6188

Discussion options

You must be logged in to vote

I don't think this is necessarily Recoil's fault (well, i never heard of that lib so maybe it is) but maybe your usage of tauri's apis (invoke in this case). All of tauri's apis need access to the window and some apis need the navigator too.

This basically means that you need to make sure that tauri's apis are only called on the client side (for example inside an componentDidMount-like useEffect hook).

Edit: whoops, didn't see your last message where you basically said the same already, sorry...

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@TristanPouliquen
Comment options

@FabianLars
Comment options

@TristanPouliquen
Comment options

@FabianLars
Comment options

@TristanPouliquen
Comment options

Answer selected by TristanPouliquen
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