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

Add before/after redraw hooks for UI Elements. #6

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

darius98
Copy link
Collaborator

@darius98 darius98 commented Dec 2, 2019

While these hooks should rarely be used, it is much safer and cleaner to use them than to override redraw or have side-effects in render.

While afterRedraw hook was discussed, beforeRedraw is added for future-compatibility with the (discussed) possibility of separating this.options and this.state: if options that are passed in from a parent's redraw() would influence the internal state, beforeRedraw() can be used to handle this case.

@darius98 darius98 merged commit 810c6d6 into master Dec 4, 2019
@mciucu mciucu deleted the after-redraw-hook branch March 17, 2023 13:50
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