-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add architecture document #949
Conversation
mofojed
commented
Oct 22, 2024
•
edited
Loading
edited
- Provide details about the overall high-level architecture of deephaven.ui
- Diagram a couple work flows
- Fixes General deephaven.ui docs (Architecture) #954
- Provide details about the overall high-level architecture of deephaven.ui - Diagram a couple work flows
- It's now in it's own file
Co-authored-by: margaretkennedy <[email protected]>
Co-authored-by: Matthew Runyon <[email protected]>
|
||
### Render context | ||
|
||
Each component renders in its own render context, which helps keep track of state and side effects. While rendering components, "hooks" are used to manage state and other side effects. The magic part of hooks is they work based on the order they are called within a component. When a component is rendered, a new context is set, replacing the existing context. When the component is done rendering, the context is reset to the previous context. This allows for nested components to have their own state and side effects, and for the parent component to manage the state of the child components, re-using the same context when re-rendering a child component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should you define hooks more explicitly before discussing their magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm they likely deserve their own instructional page, in the hooks
folder. Right now I have pages for specific hooks (use_state
, use_effect
, use_memo
) but having a top level hooks pages similar to the React docs would be handy.
I'll capture this as part of #996
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me!
Co-authored-by: margaretkennedy <[email protected]>