-
Notifications
You must be signed in to change notification settings - Fork 10
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
Conversation
✔️ 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> |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ、書いてあったね:bow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まずはtagとかリリースノートを作ろうか
Toast で内部的に使用している react-transition-group が、findDOMNodeに直接変更を加えている行為が非推奨だったため、nodeRef という props を追加して対処した。
reactjs/react-transition-group#429 (comment)
それに合わせた対応。