Skip to content

Conversation

sebmarkbage
Copy link
Collaborator

I split the injection so that we can continue using the event/property system from fiber without pulling in everything.

I also reorganize files in my best guess for which files we can reuse instead of forking.

We don't use this indirection. It'll easier to break these apart
without it.
This splits DefaultInjection into one with all the properties
and event configuration and a separate one for the things that
are relevant to he stack reconciler.

That way we can reuse the property and event system for Fiber
without pulling in all the other stuff.
This is not a generic plugin order. It's DOM specific. Unlike
say DefaultBatchingStrategy which is used by Native too.
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ReactDefaultInjection
* @providesModule ReactDOMInjection
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@iamdustan This file might be of interest to you. It is the remainder of the injection system. At least in the first version of Fiber, but we can probably get rid of these completely at some point.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah beautiful. Thanks for the callout! I’ll get a chance to look deeper later this week 😄

ReactDefaultInjection.inject();
var ReactDOMInjection = require('ReactDOMInjection');
ReactDOMInjection.inject();
var ReactDOMStackInjection = require('ReactDOMInjection');
Copy link
Contributor

Choose a reason for hiding this comment

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

should the require statement here by ReactDOMStackInjection?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah. Thanks. Updated. But I guess I don't technically need it to pass this test. Will revisit when we try to make this test work with Fiber.

@iamdustan
Copy link
Contributor

👍 I like the change of Default -> DOM making the renderer aspect much more explicit.

It appears to me like the React[Renderer]StackInjection is a stepping stone while the reconciler code lives in the renderers rather than core to the future Fiber renderer API.

@nhunzaker
Copy link
Contributor

Just a spectator but I think confusion around the injection was one of the biggest things that threw me off when first contributing. This is fantastic.

This is just moving a bunch of DOM files.

It moves things into dom/stack and dom/fiber respectively. The
dom/stack folder remains split into client/server.

Mainly the shared folder is now my best guess for files that
we can reuse in fiber. Everything else will get forked or
reimplemented.

Also moved the event system out of renderers/shared/stack and
into renderers/shared/shared.
@sebmarkbage
Copy link
Collaborator Author

I verified that I was able to build Fiber with the /shared dependencies without the files in /stack (with a few tweaks for ReactUpdates).

@gaearon
Copy link
Collaborator

gaearon commented Oct 25, 2016

Accepting to unblock, will properly review tomorrow morning.

@sebmarkbage sebmarkbage merged commit e3131c1 into facebook:master Oct 25, 2016
@sophiebits
Copy link
Collaborator

lgtm

@gaearon
Copy link
Collaborator

gaearon commented Oct 26, 2016

Read through, all looks good.

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

Successfully merging this pull request may close these issues.

6 participants