This repository was archived by the owner on Jun 26, 2020. It is now read-only.
Conversation
Not sure if that one gets merged but it fixes other issues so it's likely.
Also switch it to use the same `updater` code path both in Stack and Fiber. This removes knowledge about internal data structure from the frontend.
* We shouldn't rely on the assumption that we're operating on current Fiber * The idea to unify updaters with setInProps() was a bad one because setNativeProps() signature is too different
…e over Dan's older code for setupBackend.
trueadm
reviewed
May 31, 2017
| function setInProps(fiber, path: Array<string | number>, value: any) { | ||
| fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value); | ||
| const inst = fiber.stateNode; | ||
| fiber.pendingProps = copyWithSet(inst.props, path, value); |
Contributor
There was a problem hiding this comment.
@sebmarkbage @acdlite is this logic still applicable given the recent changes to how fiber will work with async?
There was a problem hiding this comment.
In facebook/react#9695, we never read pendingProps from the current tree, so I think this is fine.
Contributor
|
I've tested this locally and it works for me with both Stack and Fiber. I've made a comment for @acdlite in regards to his recent PR changes (facebook/react#9695) that may/may not affect this. |
21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on top of Dan's work in PR #528, with Dom's changes from master merged in. Initial smoke tests of Stack + Fiber seem promising.