-
It seems like in Remix, we load data from our DB on the server. This makes sense. However, I'm wondering what to do for live subscription stuff. E.g, if we have a firebase client that subscribes to live updates. The Firebase client will only run & receive updates in the browser. It will receive data through a method that is not |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In the end, a Remix app is still a React app, so you can still use your existing libraries. Just note that since Remix may potentially render your component on the server as well as the client, then client-only code should be called inside a Because you're getting data outside the Remix loader/actions, it will not participate in the data revalidation after a mutation. That's probably not a concern for you as you are getting "live" data anyway. |
Beta Was this translation helpful? Give feedback.
In the end, a Remix app is still a React app, so you can still use your existing libraries.
Just note that since Remix may potentially render your component on the server as well as the client, then client-only code should be called inside a
useEffect
, since they do not run on the server.Because you're getting data outside the Remix loader/actions, it will not participate in the data revalidation after a mutation. That's probably not a concern for you as you are getting "live" data anyway.