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

fix: useReducer's stale value in React@16.8.0 #761

Conversation

Aslemammad
Copy link
Member

Fixes the small failing test in #737

@vercel
Copy link

vercel bot commented Oct 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/jotai/AniDu1Ymu9Tx8gqbARtS4fDkqBAT
✅ Preview: https://jotai-git-fork-aslemammad-fix-atomfamily-test-pmndrs.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 6, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1c6e8b1:

Sandbox Source
React Configuration
React Typescript Configuration
React Browserify Configuration
React Snowpack Configuration
Next.js Configuration
Next.js with custom Babel config Configuration
React with custom Babel config Configuration

@dai-shi
Copy link
Member

dai-shi commented Oct 7, 2021

@Aslemammad Thanks for investigating this.
I wonder why it('changes atom from parent (#273, #275)' test doesn't fail.
Anyway, this seems like a bug in useReducer facebook/react#15124,
So, I will simply change the version in ci for now. We may change the implementation of useAtom in the future and may try changing it back.
Thanks again for your work!

@dai-shi dai-shi closed this Oct 7, 2021
dai-shi added a commit that referenced this pull request Oct 7, 2021
dai-shi added a commit that referenced this pull request Oct 10, 2021
* chore(ci): multiple version tests

* cache type yarn

* fix yarn add

* fix workflows

* fix workflows again

* workflow with multiline run

* fix test import paths

* patch jest config in a workflow

* using CI envvar

* revert CI test, and remove prepare

* using strategy matrix

* split default test

* remove debug log

* fix test import paths

* add missing await

* mode in job name

* fix workflow job name

* patch for react 16

* tweak workflow run name

* fix sed?

* wip: use alpha testing-library

* wip: use exclude

* fix syntax error in yml

* tweak workflow file

* update react alpha and experimental

* update react alpha/experimental

* tweak some tests for react 18

* test against 16.8.6, see #761

* workaround for now for optimization test

* atomWithStorage test works with real timeers?

* waitFoAll test works with real timeers?

* workaround for now for atomFamily test

* apply the workaround to basic.test

* tweak a test

* log testing with provider-less mode

* trying to fix tests

* tweak timings

* skip a test in 16.8 and add 16.9

* tweak timing

* improve async.test

* delay to show loading

* exclude 16.9 & alpha, more timeouts

* more timeout, hmmmm these are not very nice

* more?

* empty commit

* fix workflow yml

* empty commit

* empty commit

* more timeouts

* stable test with waitFor

* query tests with timeouts

* empty commit

* empty commit

* generally increase all timeouts

* empty commit

* empty commit

* empty commit

* empty commit
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.

None yet

2 participants