**what is the change?:**
A test was added for a change to Fiber's behavior in #9608, and because of a
bug in our CirclCI script it landed when failing for non-fiber runs of the
tests.
This just wraps the test in a feature flag because it seems clear it was
only intended to test the new fiber behavior.
Thanks to @gaearon for pairing on this! :)
**why make this change?:**
So that tests are passing on master.
**test plan:**
`npm run test ReactCompositeComponentState`
**issue:**
None - figured it out before anyone opened an issue afaik.
* Move small utility modules out of ReactDOM(Fiber)?Component
These are all going to be needed in the server renderer, so I'm moving them out now so I can use them from in there.
* Fix `didWarnShadyDOM = false;` line
* Remove injectReactDOMEventListener from ReactBrowserEventEmitter
This PR removes the injection of ReactDOMEventListener from
ReactBrowserEventEmitter. Instead, the required initialization will
happen directly in ReactDOMInjection.
This injection was (probably) originally implemented for React Native
but never used, so we can clean it up.
* Mention how to see the full ouput of fiber tests
`ReactEventListener` is a DOM-specific module although the name suggests
otherwise. This change renames the module to the more specific
`ReactDOMEventListener`.
* Initial commit for WIP benchmarking infrastructure
* fixed lint issues and ran prettier
* added <rootDir>/scripts/bench/ to ignore paths for Jest
* tidied up code and fixed a few bugs in the runner.js
* fixed eslint
* improved the benchmark output from the runner
* fixed typo
* tided up print output in runner.js
* throw error if chrome canary is not installed on mac
* added better bench stats output (tables)
* added benchmark diff to table results
* adds bundle size comparisons to results
* tidied up the results
* fixed prettier output
* attempt to trigger bech for circleci build
* fixes flow exlclusion for lighthouse module
* added class components benchmark
* cleaned up stats.js
* stability changes
* circleci node version to 7
* added another benchmark
* added colours to the different benchmarks to check if being cached
* force no-cache headers
* added more info messages
* refactor chrome launching.
* fixed an issue where launcher.kill might fail
* Move server to runner. Launch it only once.
* tidy up
* changes the logic in how the remote repo is checked out
* removes bench from circleci build
* removed colors from benchmarks (no longer needed)
* added CI integration comment
* added hacker news benchmark
* added skipBuild functionality
* relabelled remote
* Add confidence intervals
* added first meaningful paint
* removed some unused code
* reverted code.json
* updated benchmark runs back to 10
* no longer breaks when results contain missing bundles
* adds CPU throttling
* renamed build to remote-repo
* small fix to build
* fixed bad merge
* upped runs to 10 from 2 again
* properly pulls master
* removes old-bench
* runs benchmarks in headless mode
* adds a --headless option
* improved the git build process
* added README
* updated based feedback from review
* adds merge base commit sha
* addressing more PR feedback
* remove built JS react files
* updated .gitignore
* added combined bundle load times to the metrics
Recreating the class instance causes refs (and other callbacks) to close
over stale instances.
Instead, re-use the previous instance. componentWillMount is called
again. We also call componentWillReceiveProps, to ensure that
state derived from props remains in sync.
* Remove loose check when assigning non-number inputs
This commit removes a check I added when working on number input
issues where we perform a loose check on an input's value before we
assign it. This prevented controlled text inputs from disallowing
numeric text entry.
I also added a DOM fixture text case.
Related issues:
https://github.com/facebook/react/issues/9561#issuecomment-298394312
* Use strict equality as a guard before assigning input.value
This commit adds back the guard around assigning the value property to
an input, however it does it using a strict equals. This prevents
validated inputs, like emails and urls from losing the cursor
position.
It also adds associated test fixtures.
* Add copy command after build for interup with surge.sh
* Add 'unreleased' incremental change log for v15.6.0
**what is the change?:**
Adding a section to the change log where we start accumulating
annotations for React v15.6.0.
**why make this change?:**
- Saves us the trouble of writing the change log entry all at once when
we do the release.
- Adds transparency about what is in the upcoming release, for those who
aren't following https://github.com/facebook/react/issues/9398
**test plan:**
Visual inspection
**issue:**
https://github.com/facebook/react/issues/9398
* Minor tweaks to v15.6.0 changelog annotation
**what is the change?:**
- added missing `#` for commit hashes
- added minor details to two annotations
Thanks to @gaearon for the code review comments.
**why make this change?:**
Consistency and clarity.
**test plan:**
Visual inspection
**issue:**
https://github.com/facebook/react/issues/9398
* Remove hashes from commit numbers
**what is the change?:**
We had added hashes to some commit numbers, but ideally only do that
for PRs.
**why make this change?:**
Consistency - this is how github displays those types of links too. PRs
get a '#', and commits don't.
**test plan:**
Visual inspection
**issue:**
https://github.com/facebook/react/issues/9398
* Report version and bundle type to DevTools
* Flip the flag the other way around
It's easier to remember 0 is always PROD, and 1 is like DEV flag. 2 could be PROFILE in the future.
* Add version to RN inject call
* Updated the warning message for setting defaultProps on instance property.
* Updated the testcases for the defaultProps warning.
* Updated the warning message for defaultProps set on instance property.
* tutorial: adds note about onClick
* tutorial: show full square component
* merge
* fixes line number
* tutorial: misc changes
* fixes Board render initial code sample
* [tutorial] adds codepen links and misc small fixes
* removes useless arrow functions, #9531
* {this.renderSquare} new lines
* be more explicit about history state
* fixes highlight
* following along locally
* changes todo to this.props.value
* removes calculateWinner from initial codepens and includes it in tutorial
* removes note about calculateWinner at end of file
* adds debug-view and debug-view-final
* removes debug view, updates codepen instructions
* adds another codepen
* tutorial.md
* tutorial.md
* tutorial.md
* tutorial.md
* Put . into links for consistency with docs
* Make the very first change easier to follow
* A few more changes
* Update Changelog for v15.5.1-15.5.4
This could really use extra code review attention since the history of
these changes was a bit convoluted to follow.
After talking to @bvaughn and @acdlite, we thought it might make sense
to put the 'add-ons' changes in a separate change log. The other option,
of including them in the main React change log, seemed the more
confusing of the two.
Also this commit is related to and somewhat blocked by
https://github.com/reactjs/prop-types/pull/40
**what is the change?:**
Adding the change log for recent patch versions of React.
**why make this change?:**
We missed this step in the flurry of releasing patches, and it's useful
for folks who want info about what version to use.
**test plan:**
Visual inspection of the change log.
**issue:**
https://github.com/facebook/react/issues/9443
* Further improve CHANGELOG entries for v15.5.1-15.5.4
**what is the change?:**
- Use the '[@author] in [#PR/commit]' format for annotations
- Make annotations less technical, more clear
- Move 'React Addons' updates into main changelog
- Remove separate 'React Addons' changelog
**why make this change?:**
These changes each make things more clear and accurate.
**test plan:**
Visual inspection
**issue:**
* Fix final nits in CHANGELOG
**what is the change?:**
- Put backticks around package names
- Reformat link to to commit in '([@user](...) in [#NNNN](...))' format
- Remove newlines after subheaders; in the past we sometimes have
included a newline after the subheader, but most recently it looks
like we do not.
- Add some missing punctuation.
**why make this change?:**
Consistency and aesthetics
**test plan:**
Visual inspection
**issue:**
https://github.com/facebook/react/issues/9443
* Add deprecation notice to v15.5.0-15.5.3
**what is the change?:**
Adding deprecation notice to some recent React versions.
**why make this change?:**
These versions of React use a version of `prop-types` that had a
critical bug. We updated the dependency in React 15.5.4, and hopefully
people will see this notice and update.
**test plan:**
Visual inspection
**issue:**
https://github.com/facebook/react/pull/9537
this was a surprise to me because the docs seemed to indicate that when
using an updater, the result _needed_ to be a new state object. I was
[not alone](https://twitter.com/ken_wheeler/status/857939690191806464)
i think in discovering this as a result of the previous tweet in the
thread.
Adds a server-rendering fixture based on create-react-app without ejecting.
This is using the full-page strategy because I wanted to flush out any issues with it. Turns out there's a lot of little things that are fixable and some non-fixable. This actually surfaced some differences between the current strategy and the one I had in mind.
This uses the asset manifest from webpack to pass the final URLs to the client. This ensures that we can render the same exact mark up on the client - including the URL to our own script that we're running in.
Doing full document renders work with 15.x as long as the checksum matches. However, with the patch up reviving strategy I had in mind it would end up removing the CSS tags that webpack injects before running our render call. This is a behavior change.
In dev mode the server runs a proxy in front of the normal CRA webpack server so that we can replace the HTML request for the root page.
I don't know what the best way to link in the react and react-dom packages. Each fixture has a different strategy so here's another one. Just add NODE_PATH=../../build/packages in front of all commands.