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

Pass pendingProps as argument in createWorkInProgress #10643

Closed
wants to merge 2 commits into from
Closed

Pass pendingProps as argument in createWorkInProgress #10643

wants to merge 2 commits into from

Conversation

zombieJ
Copy link
Contributor

@zombieJ zombieJ commented Sep 8, 2017

Update createWorkInProgress in ReactFiber.js to accept pendingProps as argument.

@gaearon
Copy link
Collaborator

gaearon commented Sep 11, 2017

Here is the callsite that hasn't been updated. It's confusing when functions take different number of arguments in different cases.

What do you think should happen? Should we pass null explicitly?

And why did Flow not catch the missing argument?

@zombieJ
Copy link
Contributor Author

zombieJ commented Sep 13, 2017

Hi @gaearon,
Yes. I think it may better if pass null as arguments.
Since react src code is made up of many modules. Function with same args is much eazy for understanding.

And for Flow, I'm not sure why it not catch.

Let me update the pr : )

@gaearon
Copy link
Collaborator

gaearon commented Sep 13, 2017

I asked @acdlite to look at this when he finds time since it’s his TODO originally.

Copy link
Collaborator

@acdlite acdlite left a comment

Choose a reason for hiding this comment

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

We should also update all the places where we mutate pendingProps directly. There are a bunch in ReactChildFiber, like

existing.pendingProps = element.props;

@gaearon
Copy link
Collaborator

gaearon commented Sep 13, 2017

(In any case let's defer this until after 16)

@acdlite
Copy link
Collaborator

acdlite commented Sep 13, 2017

Also let's wait until expiration times lands because it will be a pain to resolve the conflicts. #10426

@zombieJ
Copy link
Contributor Author

zombieJ commented Sep 14, 2017

Got it. I will update after 16 & #10426

@zombieJ
Copy link
Contributor Author

zombieJ commented Oct 20, 2017

@acdlite @gaearon ,
To avoid merge conflict, I open a new PR for this: #11296

Close old one

@zombieJ zombieJ closed this Oct 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants