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

Migrated to new React Context API for proper work in React 18. #74

Merged
merged 4 commits into from
Jun 1, 2022
Merged

Migrated to new React Context API for proper work in React 18. #74

merged 4 commits into from
Jun 1, 2022

Conversation

ra2dev
Copy link
Contributor

@ra2dev ra2dev commented May 31, 2022

  • Migrated to new React Context API for proper work in React 18.

Also updated related libraries:

  • React to 18 - to test that it working properly. It should work with all versions >=16. *(Updated peerDependency)
  • react-stylegudist to version 6 - since regexp to match js and jsx - was not working propely.
  • webpack to version 2 - to make newer react-stylegudist working.

Copy link
Owner

@okonet okonet left a 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.

Comment on lines 141 to 143
return (<ScrollSyncContext.Provider value={this.getContextValue()}>
{React.Children.only(this.props.children)}
</ScrollSyncContext.Provider>)
Copy link
Owner

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:

Suggested change
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>

Copy link
Contributor Author

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

package.json Outdated Show resolved Hide resolved
@ra2dev ra2dev requested a review from okonet June 1, 2022 20:24
@okonet okonet merged commit f628c0f into okonet:master Jun 1, 2022
@okonet
Copy link
Owner

okonet commented Jun 1, 2022

Amazing work! Thanks for the contribution.

@github-actions
Copy link

github-actions bot commented Jun 1, 2022

🎉 This PR is included in version 0.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants