Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Fiber devtools fixes #755

Merged
merged 4 commits into from
May 31, 2017
Merged

Fiber devtools fixes #755

merged 4 commits into from
May 31, 2017

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented May 30, 2017

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.

gaearon and others added 4 commits May 30, 2017 16:10
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
@@ -134,7 +146,14 @@ function getDataFiber(fiber: Object, getOpaqueNode: (fiber: Object) => Object):
}

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebmarkbage @acdlite is this logic still applicable given the recent changes to how fiber will work with async?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In facebook/react#9695, we never read pendingProps from the current tree, so I think this is fine.

@trueadm
Copy link
Contributor

trueadm commented May 31, 2017

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.

@gaearon gaearon merged commit 1571855 into master May 31, 2017
@gaearon gaearon deleted the fiber-devtools-fixes branch May 31, 2017 15:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants