June 23 (discuss)
- Ben (React)
- Dan (React)
- Jim (React)
- Keyan (React, intern)
- Paul (React)
- Sebastian (React)
- Tom (React)
- Dan finished working on a codemod for internal Facebook code that converts 800 files to remove one of the common mixins we used.
- While doing so, Dan found an issue with inconsistent order of resolving refs during updates.
- Ideally code should not depend on ref resolution order.
- Unfortunately some Facebook components rely on it so for now we fixed this in React.
- Ben added a new test renderer intended for snapshot testing.
- For now, we don’t document it, as we might want to change the API.
- We don’t want people to rely on the renderer output or test against JSON.
- This renderer is only intended for comparing snapshots, not analyzing them.
- It is also not clear how to dispatch events with it.
- Jest plans to add a guide on using it later on its blog after it is more stable.
- We cut the RC last week and React Native RC uses it.
- It contains a lot of commits but not too many substantial changes.
- Will be released within two weeks.
- Paul started writing a maintainer’s guide to document the entire release process.
- He ran the 15.2.0 RC release using a new tool he’s working on.
- The process relies on us assigning semver labels (e.g. “major”, “patch”) but not specific milestones.
- The tool will automate the release process based on those labels.
- This should enable us to cut releases more often and let other people (e.g. React Native members) do it.
- This is a hypothetical optimization Jim wanted to try.
- What if we took functional components that render only to DOM components and precompiled them to fast path “templates”?
- This could be an optimization specific to the DOM renderer. It would use
document.createElement
orcloneNode()
. - However most components use other components so it’s unclear if there are any benefits to doing this.
- Sebastian had a more generic idea about component folding but it requires whole program analysis.
- There is nothing conclusive here and this is not something we actively investigate.
- We currently test server rendering by enabling the client side renderer to do server side rendering (we set
useCreateElement
tofalse
and re-run the suite). - We’d like to decouple client side from server side rendering.
- Sebastian’s experimental “Fiber” reconciler does not yet support server rendering.
- We need to split out server rendering before switching to Fiber.
Update on Fiber
- This is Sebastian’s work on new core algorithm.
- Its main goal is to render tree in chunks to avoid dropping frames on large updates.
- It sort of works but far from feature parity.
- Need to add support for a lot of things: lifecycle, refs, state.
- It should be possible to keep
ReactDOM
andReactDOMFiber
separate. - It would be great to test it in isolation on a single product.
Jeff will release a Flow version that infers the types from the initializers so we can write the types inline instead of specifying the type of the whole expression:
class Foo {
doStuff = (x: number): boolean => {
return true;
};
}
Please feel free to discuss these notes in the corresponding pull request.