question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Description

React 18 is now available as a release candidate

The biggest changes relevant for us that I see so far:

  • Replacing ReactDOM.render() with createRoot()
  • Automatic batching We can probably remove useBatchingCallback from packages/react
  • useId() -> new hook for generating unique IDs on both the client and server We obviously don’t use SSR, but maybe we can replace uuidv4 in some places with that.
  • globalThis.IS_REACT_ACT_ENVIRONMENT Probably no change needed besides updating Testing Library
  • No more “setState on unmounted component” warnings We added some workarounds in the past to prevent this warnings (e.g. let mounted or isMounted = useRef()). Should be able to remove these now.

Some other noteworthy APIs:

  • useSyncExternalStore
  • startTransition
  • useDeferredValue

Alternatives Considered

Additional Context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
swissspidycommented, Apr 7, 2022

All PRs have been merged, now we just have to wait for new releases 😃

1reaction
timarneycommented, Jun 13, 2022

Something that might need some testing is the “double useEffect” call when in dev mode / strict mode.

https://www.youtube.com/watch?v=j8s01ThR7bQ

Will probably result in some double fetch calls etc… not sure what else.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Upgrade to React 18
In this post, we will guide you through the steps for upgrading to React 18. Please report any issues you encounter while upgrading...
Read more >
React 18 Upgrade Guide and New Features - Refine Dev
React 18 was released! Are you looking to upgrade to React 18? Learn about the new features and changes in this comprehensive guide....
Read more >
How to Upgrade to React 18 - How-To Geek
React 18 is stable and ready to use. In most cases the upgrade process should be quick and easy, requiring only an npm...
Read more >
Upgrading to React 18 - Daily Dev Tips
This will upgrade your react and react-dom versions to at least 18. ... Now that we upgraded React itself to version 18 let's...
Read more >
An Ultimate Guide to Upgrading to React 18 - OpenReplay Blog
The React team recently released React 18 with improvements like automatic batching, a new suspense feature, and new APIs like startTransition .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found