ISISComputingGroup / WebDashboard

The web dashboard except written in a modern web framework
https://isiscomputinggroup.github.io/WebDashboard/
2 stars 2 forks source link

use react-redux for subscriptions, pv handlers etc. #24

Open rerpha opened 3 months ago

rerpha commented 3 months ago

we should split up InstrumentData to use react-redux and pass just the data into the react components.

rerpha commented 1 month ago

interesting notes here: https://redux.js.org/usage/nextjs#overall-recommendations

For App Router applications we recommend that you should:

  • only use Redux for globally shared, mutable data
  • use a combination of Next.js state (search params, route parameters, form state, etc.), React context and React hooks for all other state management.

socket.io (we're not actually using this, though we probably could use it for the client part instead of react-use-websocket) seems to think using a useeffect is still the best way of using a ws https://socket.io/how-to/use-with-react

rerpha commented 1 month ago

i'm not sure how middleware works with our gh-pages instance either - worth considering