The type of the session data. Must be JSON serializable.
The unique id of the view. This is passed to the view component as the id prop.
The slice name for the session data.
The default value or a function that returns the default value.
OptionalloadedCallback: (value: T) => voidOptional callback invoked once after data is loaded.
[state, setState, loaded] — the current data, setter, and loaded flag.
Use this hook to split your workspace view's session data into multiple named slices.
This can improve performance and reduce memory usage and it also allows
different parts of the component tree to independently load and save their session data.
Make sure to use the workspace view component's id prop and to use unique slice names
for each slice within the component tree.
A hook for persistent (session) data tied to a specific view slice. The state is automatically saved to and restored from the main process.