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

feat: Support for React versions 16.8 and 17 #72

Merged
merged 9 commits into from
Jul 27, 2024

Conversation

jungpaeng
Copy link
Member

Description

Support for React versions 16.8 and 17 has been added by updating the import path for useSyncExternalStore to use the shim version. This change ensures compatibility with older React versions while maintaining functionality with React 18.

Related Issue: Fixes #43

Changes

  • Updated the import path for useSyncExternalStore to use-sync-external-store/shim.

Motivation and Context

This change is necessary to provide compatibility with React versions 16.8 and 17, ensuring that users of these older versions can utilize the same functionality without issues.

How Has This Been Tested?

  • Tested the changes in a project using React 16.8 to ensure the store subscription works correctly.
  • Verified functionality in a React 17 project to confirm compatibility.
  • Ensured existing tests for React 18 still pass without issues.

Screenshots (if appropriate):

It tested 16.8 framer-motion example

2024-07-26.8.57.29.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have performed a self-review of my own code.
  • My code is commented, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • Any dependent changes have been merged and published in downstream modules.

Further Comments

Copy link

changeset-bot bot commented Jul 26, 2024

🦋 Changeset detected

Latest commit: c862ad7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
overlay-kit Minor
@overlay-kit/framer-motion-react-16 Patch
@overlay-kit/framer-motion-react-17 Patch
@overlay-kit/framer-motion-react-18 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jul 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
overlay-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 0:06am

@jungpaeng jungpaeng force-pushed the feat/use-sync-external-store-shim branch from cdada8d to c862ad7 Compare July 26, 2024 00:06
@jungpaeng jungpaeng merged commit 9776fff into main Jul 27, 2024
2 checks passed
@jungpaeng jungpaeng deleted the feat/use-sync-external-store-shim branch July 27, 2024 22:37
@github-actions github-actions bot mentioned this pull request Jul 22, 2024
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.

Planned Support for React 16.8 and 17
1 participant