Sync External State
Briefly

subscribe is a function that takes a callback and returns a cleanup function, called whenever the external store changes to synchronize with React's state.
getSnapshot function retrieves the current value of the external store, ensuring the React component's internal state stays updated.
getServerSnapshot, an optional function, provides the current external store value from the server for server-side rendering, aiding in efficient rehydration processes.
Suspense Component simplifies handling loading states in React, serving as a declarative solution, with further details to be covered in future workshops.
Read at | 09. Sync External State | Advanced React APIs
[
add
]
[
|
|
]