dillon1000/react

Commit

Warn when using constructor function directly

We no longer support the legacy factory style of calling component constructors
directly. We only support createElement or the wrapping of classes with
createFactory. Instead of letting this fail in a gross way as we try to run,
add a nice warning that shows up before the gross TypeError.
Browse files
Changed paths2 files
First-parent comparison
M src/classic/class/ReactClass.js ModifiedM src/classic/class/__tests__/ReactClass-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…