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: respond to events #1083

Merged
merged 8 commits into from
Jan 21, 2025
Merged

Conversation

dgodinez-dh
Copy link
Contributor

mofojed
mofojed previously approved these changes Jan 17, 2025

Yes. Event handlers are the best place for side effects.

Unlike rendering functions, event handlers do not need to be [pure](../describing/pure_components.md), so it’s a great place to change something. For example, you can change an input’s value in response to typing, or change a list in response to a button press.
Copy link
Member

Choose a reason for hiding this comment

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

Guessing you'll want a link to the state document after that is done as well.

I'm a little bit surprised there's no mention of use_callback for memoizing event handlers here, but guess it's not really the spot for it. Seems strange they're almost completely omitted from the Learn section of the React docs (I'm not seeing them anywhere in there). 🤷

@dgodinez-dh dgodinez-dh merged commit 17c6635 into deephaven:main Jan 21, 2025
18 checks passed
@dgodinez-dh dgodinez-dh deleted the dag_RespondEvents branch January 29, 2025 15:34
mattrunyon pushed a commit to mattrunyon/deephaven-plugins that referenced this pull request Feb 3, 2025
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.

3 participants