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: update Notification to support React 18 #2955

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tkers
Copy link

@tkers tkers commented Dec 12, 2024

Purpose of PR

The Notification package is currently broken when upgrading to React 19 (and somewhat breaks the use of React 18) because it uses the deprecated render function instead of the newer createRoot() method of mounting a component.

I figured keeping support for previous React versions is desired so I added a conditional import to use this new method when running React 18 or higher.

PR Checklist

  • I have read the relevant readme.md file(s)
  • All commits follow our Git commit message convention
  • Tests are added/updated/not required
  • Tests are passing
  • Storybook stories are added/updated/not required
  • Usage notes are added/updated/not required
  • Has been tested based on Contentful's browser support
  • Doesn't contain any sensitive information

@tkers tkers requested review from damann and a team as code owners December 12, 2024 15:23
Copy link

changeset-bot bot commented Dec 12, 2024

🦋 Changeset detected

Latest commit: b597b38

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

This PR includes changesets to release 36 packages
Name Type
@contentful/f36-notification Minor
@contentful/f36-accordion Minor
@contentful/f36-asset Minor
@contentful/f36-autocomplete Minor
@contentful/f36-badge Minor
@contentful/f36-button Minor
@contentful/f36-card Minor
@contentful/f36-collapse Minor
@contentful/f36-copybutton Minor
@contentful/f36-core Minor
@contentful/f36-datetime Minor
@contentful/f36-datepicker Minor
@contentful/f36-drag-handle Minor
@contentful/f36-entity-list Minor
@contentful/f36-empty-state Minor
@contentful/f36-forms Minor
@contentful/f36-icon Minor
@contentful/f36-header Minor
@contentful/f36-list Minor
@contentful/f36-menu Minor
@contentful/f36-modal Minor
@contentful/f36-navbar Minor
@contentful/f36-note Minor
@contentful/f36-pagination Minor
@contentful/f36-pill Minor
@contentful/f36-popover Minor
@contentful/f36-skeleton Minor
@contentful/f36-spinner Minor
@contentful/f36-table Minor
@contentful/f36-tabs Minor
@contentful/f36-text-link Minor
@contentful/f36-tooltip Minor
@contentful/f36-typography Minor
@contentful/f36-components Minor
@contentful/f36-image Minor
@contentful/f36-avatar Minor

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 Dec 12, 2024

@tkers is attempting to deploy a commit to the Contentful Apps Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Dec 12, 2024

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

Name Status Preview Updated (UTC)
forma-36 ❌ Failed (Inspect) Dec 12, 2024 3:26pm

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.

1 participant