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

Examples/using unstated #6920

Closed
wants to merge 9 commits into from
Closed

Examples/using unstated #6920

wants to merge 9 commits into from

Conversation

greglobinski
Copy link
Contributor

@greglobinski greglobinski commented Aug 1, 2018

This is an example of usage - unstated as a central state container.

I tried to ask if such a code is welcome as PR #6840

If you do not want to fatten the examples folder just close this request.

@KyleAMathews
Copy link
Contributor

Deploy preview for using-postcss-sass failed.

Built with commit f90bcc7

https://app.netlify.com/sites/using-postcss-sass/deploys/5b6112623813f07d4ad70018

@KyleAMathews
Copy link
Contributor

Deploy preview for using-styled-components failed.

Built with commit f90bcc7

https://app.netlify.com/sites/using-styled-components/deploys/5b6112633813f07d4ad70020

@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit f90bcc7

https://deploy-preview-6920--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit f90bcc7

https://deploy-preview-6920--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Deploy preview for gatsbyjs failed.

Built with commit f90bcc7

https://app.netlify.com/sites/gatsbyjs/deploys/5b6112613813f07d4ad70010

@pieh
Copy link
Contributor

pieh commented Aug 3, 2018

Hey, let's try to not multiplicate very similiar examples.
How about instead of adding example, we add guide / recipe to the docs that show how to setup any package that uses Provider (so this can be redux, unstated or even "new" React context)?

Also side note - replaceRouterComponent API will probably be removed when we switch from react-router to @reach/router ( #6918 ). It also doesn't make sense to use that API to add providers - it feels this is needed right now because it injects components in appropiate place in component tree right now? If any of other existing APIs doesn't allow to do that (potentially wrapRootComponent could be good candidate?) we should add such an API

@pieh
Copy link
Contributor

pieh commented Aug 3, 2018

As follow up to my previous comment - using wrapRootComponent is viable replacement for replaceRouterComponent in "Provider" usecases - see #6986

@greglobinski
Copy link
Contributor Author

Ok. Thank you.

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.

None yet

5 participants