styleguidist / react-styleguidist

Isolated React component development environment with a living style guide
https://react-styleguidist.js.org/
MIT License
10.83k stars 1.44k forks source link

React 16 #614

Closed sapegin closed 6 years ago

sapegin commented 7 years ago

This issue will track React 16 compatibility. It seems to work fine but there are several peer dependency warnings.

Dependencies compatibility:

Styleguidist upgrade status:

vlad-zhukov commented 7 years ago

Just wanted to note that this issue is about using React 16 internally. Examples (can?) use the version of React you (as a developer) provide. What it means is you can use React 16 in examples right now, or use an older React version when the styleguidist will use v16 internally.

sapegin commented 7 years ago

Yes, it’s about making sure that Styleguidist itself will work with React 16 and will not print peer dependencies warning.

smashercosmo commented 7 years ago

react-codemirror2 has got support for react 16

nwwells commented 7 years ago

For react-icons, see https://github.com/gorangajic/react-icons/issues/116 and https://github.com/gorangajic/react-icons/issues/117

For react-codemirror2, see https://github.com/scniro/react-codemirror2/issues/15. Upgrading to v2.0.2+ should work. Any reason that particular package is pegged to v2.0.0 when all the others are more permissive? even just ~v2.0.0 would be sufficient to pick up bugfix releases.

Happy to submit a PR with the dep upgrades.

sapegin commented 7 years ago

Any reason that particular package is pegged to v2.0.0 when all the others are more permissive?

I think it was because of #611, ^ should work fine now.

Happy to submit a PR with the dep upgrades.

@nwwells Please do it ;-)

nwwells commented 7 years ago

Will do. I was recently made a contributor on https://github.com/gorangajic/react-icons so I'll work on resolving the issue there first and then get to this, hopefully today.

nwwells commented 7 years ago

submitted #622 for review. I believe that's all that should be needed, but I need to test after the new react-icons release is published.

tizmagik commented 7 years ago

I'd like to work on adding a componentDidCatch() handler -- mostly because I wanted to work with it a bit and learn how best to use it. @sapegin did you have thoughts on where it should be added/what should happen on error?

sapegin commented 7 years ago

@tizmagik Sounds awesome! I’ll learn from you ;-)

We’re already catching errors in users’ components (each has a separate React root anyway) so I think we need a global componentDidCatch handler to catch bugs in Styleguidist or user customizations (when users replace Styleguidist components). It could look similar to React error overlay and say something like “if you believe it’s a bug in Styleguidist, report it”.

nwwells commented 7 years ago

react-icons marks support for react 16 as of 2.2.6.

nwwells commented 7 years ago

Hey, it looks like the package.lock needs to be updated as well, will submit a PR for that soon.

nwwells commented 7 years ago

updated react-icons in https://github.com/styleguidist/react-styleguidist/pull/628

sapegin commented 7 years ago

I’ve removed react-modal and tweaked examples.

tizmagik commented 7 years ago

What's up with markdown-to-jsx? It seems to work fine, no?

sapegin commented 7 years ago

@tizmagik I think it is, let’s check it ;-)

tizmagik commented 7 years ago

Yea, I checked it out locally and it seemed to be working fine, but someone else could double-check I guess.

nwwells commented 6 years ago

Verified that upgrading to v6.0.28 got rid of peer dependency warnings! Yay!

sapegin commented 6 years ago

@nwwells Awesome! Then the only thing left is #631.