Skip to content
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: render cycle #1087

Merged
merged 8 commits into from
Jan 23, 2025
Merged

docs: render cycle #1087

merged 8 commits into from
Jan 23, 2025

Conversation

dgodinez-dh
Copy link
Contributor


### Initial Render

When your component first mounts, it triggers an initial render. It is rendered with it's props and initial state.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably detail what "mounts" means.
We're talking about when the component is opened by a user, or viewed in a dashboard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

After you trigger a render, `deephaven.ui` encodes your components as JSON which is sent from the server to the web client UI. The client decodes the JSON into a document which is rendered by React.

- On initial render, `deephaven.ui` will encode the root component.
- For subsequent renders, `deephaven.ui` will encode the component whose state update triggered the render.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't actually true yet - we're still re-encoding everything and sending it.
I needed to update Steven's pending change and get it over the line: #1069

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I remove this part of the doc for now?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I think just remove these bullet points for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated


## Step 2: `deephaven.ui` renders your components

After you trigger a render, `deephaven.ui` encodes your components as JSON which is sent from the server to the web client UI. The client decodes the JSON into a document which is rendered by React.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be worded a bit differently, we should mention this is the part where it runs the component functions and then it encodes it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@dgodinez-dh dgodinez-dh requested a review from mofojed January 23, 2025 14:21
@dgodinez-dh dgodinez-dh merged commit fece0a7 into deephaven:main Jan 23, 2025
18 checks passed
@dgodinez-dh dgodinez-dh deleted the dag_RenderCycle branch January 29, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants