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.

Investigation: try React-Redux v7 / v8 with React 18 alpha

See original GitHub issue

React 18 is now available as preview alpha releases (per https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html ).

The React team has put together a Working Group discussion forum to describe the changes in React 18 in more detail: https://github.com/reactwg/react-18/discussions

Looking at that forum, there’s several issues that may be relevant to React-Redux in some way:

I’d like to have some folks start trying out React-Redux v7 with React 18 alpha, and report any interesting findings. We could potentially use some of the example apps from the Redux tutorials, and any of the example CodeSandboxes linked in our docs.

You would need to:

  • Switch the React version to one of the React 18 alphas, and update the app to use React.createRoot() per instructions
  • Try out the app
  • Hand-inspect the behavior to see if anything seems unexpected

We’re interested in seeing examples and comparisons with both connect and useSelector.

It would also be worth cloning the React-Redux repo, and updating our React devDep to run our tests against the alphas.

The React team has reported that a brief test of a couple Redux-based apps combined with createRoot + StrictMode did not appear to be working correctly - in particular, no re-rendering happening despite actions being dispatched.

It’s very possible that Strict Effects running effects callbacks more than once is causing problems with subscriptions.

We’d appreciate any feedback reports!

Please provide this info:

  • Details on the example app used
  • Link to updated source code / CodeSandbox if possible
  • Description of observed behavior, good or bad (“works okay”, “clicking button X doesn’t update the UI”, etc)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

4reactions
gaearoncommented, Jun 11, 2021

Note to folks trying — if you have StrictMode on, please test both with StrictMode and without it. This is to see if some issues only occur in StrictMode. (StrictMode has gotten “stricter.”)

3reactions
gaearoncommented, Sep 13, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

react-redux 8.0.0-alpha.1 on Node.js NPM - NewReleases.io
New release react-redux version 8.0.0-alpha.1 v8.0.0-alpha.1 on Node.js NPM. ... Investigation: try out React-Redux v7 / v8 with React 18 alpha ...
Read more >
React 18, React Redux 8, and TypeScript: What you need to ...
Learn about Redux 8, a state management library for React, and how it works with React 18 and it's TypeScript codebase conversion.
Read more >
Gatsby Changelog | 5.3.0
GraphiQL v2 - An all new UI with features like dark mode, tabs, and persisted state. Major dependency updates: Node 18; React 18....
Read more >
npm install issue : 27 vulnerabilities (16 moderate, 9 high, 2 ...
When I enter npm install in the relevant react project folder, it gives back this error after installing node modules 27 vulnerabilities (16 ......
Read more >
React 18 milestone: React-Redux adopts useSyncExternalStore
import { useSyncExternalStoreExtra } from 'use-sync-external-store/extra'; // React-Redux v8 alpha code in useSelector() const selectedState ...
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