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

update React v17 #202

Closed
youchann opened this issue Nov 20, 2020 · 7 comments · Fixed by #200
Closed

update React v17 #202

youchann opened this issue Nov 20, 2020 · 7 comments · Fixed by #200
Assignees
Labels
dependencies Pull requests that update a dependency file

Comments

@youchann
Copy link
Contributor

現状はできない。

  • 依存関係のreact-selectがまだpeerDependencies内でv17を扱っていない(他のライブラリもそうである可能性がある)

  • ライブラリreact-transition-group内で利用しているdeprecatedなメソッドReactDom.findDOMNode()をReact17で利用するとエラーが起こる
    ※以下は React17に上げる #200 内のexample/typescript内で利用した時のもの
    image

@youchann youchann added the dependencies Pull requests that update a dependency file label Nov 20, 2020
@youchann youchann self-assigned this Nov 20, 2020
@youchann
Copy link
Contributor Author

youchann commented Nov 20, 2020

facebook/react#20131

この辺りのissueが解決される。あるいは、react-transition-groupがよしなに対応してくれるのを待つ。

ちなみにreact-selectも内部でreact-transition-groupを利用している。

@youchann
Copy link
Contributor Author

youchann commented Nov 20, 2020

reactjs/react-transition-group#678
react-transition-group自体もReact17未対応っぽいな。

@youchann youchann pinned this issue Nov 20, 2020
@youchann
Copy link
Contributor Author

mui/material-ui#23311

17自体はほぼ未破壊な変更なので、peerDependenciesに17を盛り込みさえすれば、利用側でReact17を扱える。(ingred-ui自体に17を取り込まなくても対応は可能)

@youchann
Copy link
Contributor Author

ちょっとやってみる

@youchann
Copy link
Contributor Author

これらをみた感じだとyarn linkだと起こりうるエラーっぽい。
書いてあったことをしたらローカルでもデバッグできた

https://tech-1natsu.hatenablog.com/entry/2019/01/10/193043
facebook/react#14317

@youchann
Copy link
Contributor Author

ただ利用側で本当に動くのか??というのがリリースしないとわからないのアレだな。。。
smart-hrさんはこのためのe2eテストを導入しているのかね..?

@youchann
Copy link
Contributor Author

一応動作確認はできた。がすごいアナログ感なので何か良い方法を考えたい。

  • ブランチ指定で社内プロダクトにyarn addする
  • dist/(成果物)は生成されていないので、手元のingred-ui/distとすり替える
  • 社内プロダクトで検証

みたいな感じで動作確認をした。

yarn add (ブランチ指定のingred-ui)を叩いた時点で依存関係は保証されるので、複数のReactが入るみたいなことはリリースしても起こらないはず。

@hirokikondo86 hirokikondo86 unpinned this issue Mar 25, 2021
@hirokikondo86 hirokikondo86 pinned this issue Mar 25, 2021
@ryokosuge ryokosuge unpinned this issue Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant