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

Support zero-mutation hydration via an attribute #24

Merged
merged 3 commits into from
Dec 29, 2019
Merged

Conversation

developit
Copy link
Member

This extends #23 with a new hydrate generic attribute. When specified, initial render will perform hydration instead of a mutative render:

register(({ color, label }) => (
  <button class="fancy" style={{ padding: 10, color }}>
    {label}
  </button>
), 'fancy-button', ['color', 'text'])
<fancy-button color="red" label="Click Me!">
  <button class="fancy" style="padding:10px; color:red;">Click Me!</button>
</fancy-button>

@developit developit changed the base branch from optimizations-and-dx to master December 26, 2019 20:25
@developit developit merged commit d980274 into master Dec 29, 2019
@marvinhagemeister marvinhagemeister deleted the hydrate-option branch January 2, 2020 08:52
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