This project is mirrored from https://github.com/facebook/react.git.
Pull mirroring updated .
- Jan 04, 2021
-
-
Brian Vaughn authored
-
Jaiwanth authored
-
Brian Vaughn authored
-
- Dec 23, 2020
-
-
Brian Vaughn authored
-
Sebastian Silbermann authored
Co-authored-by:
Brian Vaughn <bvaughn@fb.com>
-
- Dec 21, 2020
-
-
Sebastian Silbermann authored
-
- Dec 19, 2020
-
-
Andrew Clark authored
- react-fetch - react-fs - react-pg - react-server-dom-webpack
-
Andrew Clark authored
With separate lists for stable and experimental.
-
Andrew Clark authored
-
Andrew Clark authored
Passive flags are a new concept that is tricky to get right. We've already found two bugs related to PassiveStatic. Let's remove this optimization for now, and add it back once the main part of the effects refactor lands.
-
Andrew Clark authored
Fixes the regression test added in #20433
-
Andrew Clark authored
-
Andrew Clark authored
This allows us to use those fields during passive unmount traversal.
-
Andrew Clark authored
-
Andrew Clark authored
Indicates that a tree needs passive clean-up on deletion.
-
- Dec 18, 2020
-
-
Andrew Clark authored
Same as #20398 but for Deletions. There's no new regression test, but in the effects refactor, existing tests will fail without this.
-
Rick Hanlon authored
* Add back enableSchedulerTimeoutInWorkLoop flag * Nvm, keep it as disableSchedulerTimeoutInWorkLoop
-
- Dec 17, 2020
-
-
Luna Ruan authored
As per Seb's comment in #20465, we need to do the same thing in React Native as we do in Relay. When `parseModel` suspends because of missing dependencies, it will exit and retry to parse later. However, in the relay implementation, the model is an object that we modify in place when we parse it, so when we we retry, part of the model might be parsed already into React elements, which will error because the parsing code expect a Flight model. This diff clones instead of mutating the original model, which fixes this error.
-
- Dec 16, 2020
-
-
Luna Ruan authored
When `parseModel` suspends because of missing dependencies, it will exit and retry to parse later. However, in the relay implementation, the model is an object that we modify in place when we parse it, so when we we retry, part of the model might be parsed already into React elements, which will error because the parsing code expect a Flight model. This diff clones instead of mutating the original model, which fixes this error.
-
- Dec 15, 2020
-
-
Oliver Lassen authored
-
- Dec 14, 2020
-
-
Dan Abramov authored
-
Dan Abramov authored
* Extract recordModule * Add support for concatenated modules
-
- Dec 12, 2020
-
-
Dan Abramov authored
-
Andrew Clark authored
@sebmarkbage reminded me that the complete phase of SuspenseList will sometimes enter the begin phase of the children without calling `createWorkInProgress` again, instead calling `resetWorkInProgress`. This was raised in the context of considering whether #20398 might have accidentally caused a SuspenseList bug. (I did look at this code at the time, but considering how complicated SuspenseList is it's not hard to imagine that I made a mistake.) Anyway, I think that PR is fine; however, reviewing it again did lead me to find a different bug. This new bug is actually a variant of the bug fixed by #20398. `resetWorkInProgress` clears a fiber's static flags. That's wrong, since static flags -- like PassiveStatic -- are meant to last the lifetime of the component. In more practical terms, what happens is that if a direct child of SuspenseList contains a `useEffect`, then SuspenseList will cause the child to "forget" that it contains passive effects. When the child is deleted, its unmount effects are not fired :O This is the second of this type of bug I've found, which indicates to me that it's too easy to accidentally clear static flags. Maybe we should only update the `flags` field using helper functions, like we do with `lanes`. Or perhaps we add an internal warning somewhere that detects when a fiber has different static flags than its alternate.
-
- Dec 10, 2020
-
-
Sebastian Markbåge authored
We replay errors so you can break on paused exceptions. This is done in the second pass so that the first pass can ignore suspense. Originally this threw the original error. For suppression purposes we copied the flag onto the original error. https://github.com/facebook/react/blob/f1dc626b29b8bf0f14c75a8525e8650b7ea94a47/packages/react-reconciler/src/ReactFiberScheduler.old.js#L367-L369 During this refactor it changed to just throw the retried error: https://github.com/facebook/react/pull/15151 We're not sure exactly why but it was likely just an optimization or clean up. So we can go back to throwing the original error. That helps in the case where a memoized function is naively not rethrowing each time such as in Node's module system. Unfortunately this doesn't fix the problem fully. Because invokeGuardedCallback captures the error and logs it to the browser. So you still end up seeing the wrong message in the logs. This just fixes so that the error boundary sees the first one.
-
Dan Abramov authored
* Make react-fs server-only * Make react-pg server-only
-
Dan Abramov authored
* [Flight] Prevent non-Server imports of aliased Server entrypoints * Fix Flow + await * Tighten the types
-
Dan Abramov authored
-
Dan Abramov authored
* [Flight] Rename the shared entry point * Shared
-
Dan Abramov authored
* Put .server.js at the end of bundle filenames * Client too
-
Dan Abramov authored
* Don't allocate the inner cache unnecessarily We only need it when we're asking for text. I anticipate I'll want to avoid allocating it in other methods too when it's not strictly necessary. * Add fs.access * Add fs.lstat * Add fs.stat * Add fs.readdir * Add fs.readlink * Add fs.realpath * Rename functions to disambiguate two caches
-
Brian Vaughn authored
-
Brian Vaughn authored
We originally added a new DEV behavior of double-invoking effects during mount to our new reconciler fork in PRs #19523 and #19935 and later refined it to only affect modern roots in PR #20028. This PR adds that behavior to the old reconciler fork with a small twist– the behavior applies to StrictMode subtrees, regardless of the root type. This commit also adds a few additional tests that weren't in the original commits.
-
- Dec 09, 2020
-
-
togami2864 authored
-
Dan Abramov authored
-
Dan Abramov authored
* [Flight] Add rudimentary FS binding * Throw for unsupported * Don't mess with hidden class * Use absolute path as the key * Warn on relative and non-normalized paths
-
Andrew Clark authored
This was added in a later step of the refactor but since `deletions` array already landed, clearing it should, too. I think it's unlikely that this causes GC problems but worth adding anyway.
-
Dan Abramov authored
-
- Dec 08, 2020
-
-
inokawa authored
-
Hollow Man authored
Signed-off-by:
Hollow Man <hollowman@hollowman.ml>
-