React: React 16 Spillover

Created on 4 Oct 2017  路  6Comments  路  Source: facebook/react

Just dumping these items here since I want to close the 16 umbrella.

  • [x] Convert OSS repo to ES6 modules (does not block release; nice-to-have follow up)
  • [x] Move https://gist.github.com/gaearon/9a4d54653ae9c50af6c54b4e0e56b583 to docs and update fb.me/react-polyfills to point there
  • [x] Fix RN crash in DEV https://github.com/facebook/react/issues/10518
  • [x] It's worth looking into existing ssr error entries in the attribute table. They might mean bugs.
  • [x] Decide: after flat bundles, how does one create a custom Fiber renderer? (doesn't block final, but ideally do for final. internal PR WIP at FB, @gaearon or @bvaughn has context)
  • [ ] Update "unknown property" warning documentation for new behavior in https://github.com/facebook/react/issues/10399 (currently the warning points to the blog post https://fb.me/react-attribute-behavior)
  • [ ] Update crossorigin doc and warning to clarify thrower/catcher semantics (@gaearon @bvaughn @sebmarkbage)
  • [ ] Add Closure Compiler with ADVANCED and deal with mangling properly (does not block release; nice-to-have follow up)
  • [ ] Whitelist/blacklist warnings
  • [ ] Add yellow box for warnings https://github.com/facebook/react/pull/7360 (could make opt-in in minor release) (@bvaughn ) [let's make this opt-in in 16.x, on by default in 17]
  • [ ] RN: [what is this?] Make sure instanceProps in聽ReactNativeComponentTree聽doesn't leak. (@sebmarkbage,聽@bvaughn)
  • [ ] RN: ensure we keep all important invariants (such as that聽text must be wrapped聽in聽<Text>) (Dan: I moved this back to blockers because shipping without invariants and adding them later will be painful)
  • [ ] Decide how to handle the situation where a container has its content changed outside of React. Right now we warn for this, and it also either silently fails or throws a cryptic error. Should we also throw an error? Or can/should we fix this behavior to match previous React? See comments on https://github.com/facebook/react/issues/10294 (@flarnie)
  • [ ] Consider logging caught errors immediately rather than during commit (@gaearon @bvaughn)
  • [ ] Improve component stack usability (issue #10461 / PR #10484)
  • [ ] https://github.com/facebook/react/issues/10863 SSR should probably lowercase attributes in HTML namespace. PR: https://github.com/facebook/react/pull/11110.
Umbrella

Most helpful comment

Isn't the message in the documentation these days to _not_ use the string refs and instead use a callback to save it to your own variable? 馃

All 6 comments

After years of having a message in documentation to use refs['abc'] instead of refs.abc to enable advanced optimization in Closure Compiler, React will finally support advanced optimization. Great news!

That will continue to be the case in your own code; the reference here is surely to build react itself with closure compiler's danger mode.

@ljharb Yes, that's already clear. The real problem is that it's often the case my code doesn't constitute the majority of the bundle.

Isn't the message in the documentation these days to _not_ use the string refs and instead use a callback to save it to your own variable? 馃

String refs are legacy, yes. They aren't the recommendation.

We advise against it because string refs have some issues, are considered legacy, and are likely to be removed in one of the future releases. If you鈥檙e currently using this.refs.textInput to access refs, we recommend the callback pattern instead.

source: https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs

Stale.

Was this page helpful?
0 / 5 - 0 ratings