-
Notifications
You must be signed in to change notification settings - Fork 62
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
Migrated to new React Context API for proper work in React 18. #74
Migrated to new React Context API for proper work in React 18. #74
Conversation
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.
Just a couple of small things but after they are resolved it can be merged.
src/ScrollSync.jsx
Outdated
return (<ScrollSyncContext.Provider value={this.getContextValue()}> | ||
{React.Children.only(this.props.children)} | ||
</ScrollSyncContext.Provider>) |
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.
Why is parentheses needed? I think it can be:
return (<ScrollSyncContext.Provider value={this.getContextValue()}> | |
{React.Children.only(this.props.children)} | |
</ScrollSyncContext.Provider>) | |
return <ScrollSyncContext.Provider value={this.getContextValue()}> | |
{React.Children.only(this.props.children)} | |
</ScrollSyncContext.Provider> |
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.
Eslint exends from okonet
that extend from airbnb
rules that has react/jsx-wrap-multilines.
But without parentheses is cleaner so i disabled this rule.
Changes: 51cabd7#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R39
Amazing work! Thanks for the contribution. |
🎉 This PR is included in version 0.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Also updated related libraries: