React: 15.5 addon bugs

Created on 9 Apr 2017  路  10Comments  路  Source: facebook/react

This release has been a bit rocky. 馃槢
I'm keeping track of known issues to fix them up together in the next patch.

  • [x] Expose unstable_batchedUpdates on shallow renderer (https://github.com/facebook/react/pull/9382), needed for Enzyme (https://github.com/airbnb/enzyme/pull/876#issuecomment-292747996)
  • [x] Create Fragment CommonJS entry point is messed up (https://github.com/facebook/react/pull/9383, https://github.com/facebook/react/issues/9381)
  • [x] CRC package misses dependency on object-assign
  • [x] Some CommonJS addons inline fbjs unnecessary
  • [x] UMD files contain process shim
  • [x] UMD files aren't envified
  • [x] LinkedInput UMD is broken
  • [x] Release linked-input
  • [x] prop-types is missing LICENSE and PATENT file
  • [x] Fix and release create-react-class (tagging @acdlite for this and add the rest of us)

Regarding create-react-class:

  • Add docs link to the main docs. Currently just says "_Documentation is WIP_".
  • Add peer deps for React 15.5+ (15.5+ because of replaceState callback issue). Currently there are no peer deps at all, only dev deps.
  • Release update to NPM

Most helpful comment

I think there are a couple of additional things we need to do for create-react-class:

  • Add docs (at least a link to the main docs). Currently just says "_Documentation is WIP_".
  • Add peer deps for React 15.5+ (15.5+ because of replaceState callback issue). Currently there are no peer deps at all.
  • Release with peer deps and recently-added object-assign dep

All 10 comments

Packages misses dependency on object-assign

Just the create-react-class package, right?

yep

FWIW the prop-types package.json does list "BSD-3-Clause" license which is, I think, the same as the one we have in the LICENSE files.

Going to tag @acdlite to do this too since it looks like he's made changes to prop-types that weren't pushed to 15.5-dev or 15-stable branches.

Going to tag @acdlite to do this too since it looks like he's made changes to prop-types that weren't pushed to 15.5-dev or 15-stable branches.

Did the source of truth move to reactjs/prop-types? Maybe we should delete folder in the branches.

Oh! You're right. Andrew mentioned that at one point but I forgot.

I'd add the license and patents file and do a point release of prop-types then.

I think there are a couple of additional things we need to do for create-react-class:

  • Add docs (at least a link to the main docs). Currently just says "_Documentation is WIP_".
  • Add peer deps for React 15.5+ (15.5+ because of replaceState callback issue). Currently there are no peer deps at all.
  • Release with peer deps and recently-added object-assign dep

Formerly, React.createClass would set the displayName by default. This seems to have been omitted in create-react-class. Is this intentional? Thanks.

create-react-class still does this for DEV mode, no?

// Add verbose displayName to the function, which helps when looking
// at profiling tools.
if (typeof property === 'function' && spec.displayName) {
  proto[name].displayName = spec.displayName + '_' + name;
}

I think @J-Dickson is referring to Babel inferring displayName automatically (which is the case with React.createClass call). AFAIK we're waiting for a Babel release that does it for createReactClass. (@acdlite can clarify.)

But until it's not there, the codemod we're providing (see the blog post) adds a displayName manually to your existing classes.

Oh! So this: babel/babel/pull/5554

Was this page helpful?
0 / 5 - 0 ratings