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

react-transition-group の warning 対応 #684

Merged
merged 8 commits into from
Jan 24, 2022

Conversation

takurinton
Copy link
Contributor

Toast で内部的に使用している react-transition-group が、findDOMNodeに直接変更を加えている行為が非推奨だったため、nodeRef という props を追加して対処した。
reactjs/react-transition-group#429 (comment)

それに合わせた対応。

@netlify
Copy link

netlify bot commented Jan 24, 2022

✔️ Deploy Preview for ingred-ui ready!

🔨 Explore the source changes: 21ef0ec

🔍 Inspect the deploy log: https://app.netlify.com/sites/ingred-ui/deploys/61ee52af8b626200089d27a4

😎 Browse the preview: https://deploy-preview-684--ingred-ui.netlify.app

appear={true}
mountOnEnter={true}
timeout={timeout}
classNames={Styled.transitionClass}
{...rest}
>
{children}
<div ref={nodeRef}>{children}</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSSTransition の中に div タグ作ってそこにも ref を渡さないとアニメーションのためのイベントがうまく伝達されない。

reactjs/react-transition-group#668 (comment)

<CSSTransition nodeRef={nodeRef}>
  <div ref={nodeRef}>
    {children}
  </div>
</CSSTransition>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

あ、書いてあったね:bow:

@takurinton
Copy link
Contributor Author

react-transition-group<Transition /><CSSTransition /> が書かれてるところの修正をした。

Copy link
Contributor

@youchann youchann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

まずはtagとかリリースノートを作ろうか

@takurinton takurinton merged commit 68c1386 into master Jan 24, 2022
@takurinton takurinton deleted the fix/react-transition-group-warning branch January 24, 2022 09:15
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

2 participants