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

Move component recursion to ReactReconciler #3

Open
19 tasks
mridgway opened this issue Feb 6, 2016 · 0 comments
Open
19 tasks

Move component recursion to ReactReconciler #3

mridgway opened this issue Feb 6, 2016 · 0 comments

Comments

@mridgway
Copy link
Owner

mridgway commented Feb 6, 2016

See facebook/react@master...mridgway:reconcilerRecursion for progress.

This PR involves removing ReactReconciler calls and still maintain event queue orders for React*Component. From my analysis these are the spots that need to be addressed:

ReactCompositeComponent

mountComponent

Mount queue: componentDidMount (post-recursion)

  • hoist ReactReconciler calls
  • Add postMount interface to handle post-recursion

receiveComponent

Mount queue: componentDidUpdate (post-recursion)

  • hoist ReactReconciler calls
  • Add postUpdate interface to handle post-recursion

unmountComponent

  • hoist ReactReconciler calls

ReactDOMComponent

mountComponent

Mount queue: trapBubbledEventsLocal (pre-recursion), putListener (pre-recursion), focusDOMComponent (post-recursion)

  • hoist ReactReconciler calls
  • Add postMount interface to handle post-recursion

receiveComponent

Mount queue: putListener (pre-recursion), postUpdateSelectWrapper (post-recursion)

  • hoist ReactReconciler calls
  • Add postUpdate interface to handle post-recursion

unmountComponent

  • hoist ReactReconciler calls

ReactReconciler

Also, ReactDOMComponent uses DomLazyTree objects that the reconciler would need to recognize. In order to keep ReactReconciler decoupled, there will need to be a generic interface for trees and a plugin for handling DomLazyTree specifically.

mountComponent

  • implement recursion
  • attachRefs queue (pre: must be before other queued methods)
  • implement generic LazyTree injection
  • call postMount on React*Component for implementing post-recursion event queueing

receiveComponent

  • implement recursion
  • call postUpdate on React*Component for implementing post-recursion event queueing

unmountComponent

  • implement recursion
  • call postUnmount for implementing post-recursion event removal

Testing

  • Fix tests that are affected by internal API changes
mridgway pushed a commit that referenced this issue Jun 12, 2017
* Remove useCreateElement flag

* Use Circle node #3 for ESLint
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

No branches or pull requests

1 participant