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

wip: refactor to use only react context + render props #1

Merged
merged 1 commit into from
Aug 27, 2018

Conversation

alexkrolick
Copy link
Owner

@alexkrolick alexkrolick commented Aug 26, 2018

Gets rid of the singleton store and observable dependency in favor of React context + nesting

The most basic way to use this is just using a render prop that accepts state + setState and is almost the same as State from react-powerplug, but the whitespace limitations make it very difficult to work with. Providing the values as context seems cleaner for more complex documents even if it requires more local nesting. See demo/counter-child-function.mdx.

@alexkrolick alexkrolick force-pushed the proposal--init-as-parent branch from f496afd to 6a2fee4 Compare August 27, 2018 06:26
@alexkrolick alexkrolick merged commit 51828a8 into master Aug 27, 2018
@alexkrolick alexkrolick deleted the proposal--init-as-parent branch August 27, 2018 06:30
alexkrolick added a commit that referenced this pull request Aug 27, 2018
Gets rid of the singleton store and observable dependency in favor of React context + nesting

The most basic way to use this is just using a render prop that accepts state + setState and is almost the same as State from react-powerplug, but the whitespace limitations make it very difficult to work with. Providing the values as context seems cleaner for more complex documents even if it requires more local nesting. See demo/counter-child-function.mdx.
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.

1 participant