Commit Graph
19463 Commits
Author SHA1 Message Date
Dan Abramov a77bbf1a1c [ESLint] Warn against assignments from inside Hooks (#14916)
* [ESLint] Warn against assignments from inside Hooks

* Include variable name

* Add a test for the legit case
2019-02-21 19:23:00 +00:00
Dan Abramov 219ce8a9cc Fix tracing fixture (#14917) 2019-02-21 18:14:32 +00:00
Dan Abramov 8c1966590a Release 16.8.3 2019-02-21 18:09:18 +00:00
Dan Abramov 7de4d23919 Fix UMD builds by re-exporting the scheduler priorities (#14914) 2019-02-21 17:20:28 +00:00
Brian Vaughn df4a09d9b8 Updated flow-bin from 91 -> 93 and removed unnecessary fixmes 2019-02-21 09:15:47 -08:00
Brian Vaughn e35819e68d Renamed nativeHookIndex -> index 2019-02-21 08:59:46 -08:00
Nathan Hunzaker d0318fb3f9 Updating copyright headers, dropping the year (#14893)
* Updating copyright headers, dropping the year
* Update copyright in ReactDOMHooks-test and react-cache LRU.js
2019-02-21 08:46:13 -08:00
Brian Vaughn 532cca8013 Merge pull request #4 from mishaor/linux-support
Added support for Linux
2019-02-21 08:24:33 -08:00
Michael Orishich b0ccd9d89e added basic support for Linux 2019-02-21 20:00:11 +02:00
Eli White f978d5fde4 Fix warning message for new setNativeProps method. on -> with (#14909) 2019-02-20 23:53:21 -08:00
Eli White b0f45c0fc6 Adding ReactNative.setNativeProps that takes a ref (#14907)
* Adding ReactNative.setNativeProps that takes a ref

* Adding test for components rendered with Fabric with Paper's setNativeProps

* Fixing flow types

* Fix prettier

* Rename ReactNativeSetNativeProps.js to be more general
2019-02-20 23:20:42 -08:00
Brian Vaughn 8cd8b29015 Added support for editable hook values (pending facebook/react/pull/14906) 2019-02-20 15:58:52 -08:00
Eli White 4f4aa69f1b Adding setNativeProps tests for NativeMethodsMixin (#14901) 2019-02-20 13:16:35 -08:00
Brian Vaughn 90f98372a9 Fixed broken 'shutdown' event that lead to CPU problems when reloading DevTools 2019-02-20 11:55:48 -08:00
Eli White b96b61dc4d Use the canonical nativeTag for Fabric's setNativeProps (#14900)
* Use the canonical nativeTag for Fabric's setNativeProps

* Fix prettier
2019-02-20 11:09:31 -08:00
Brian Vaughn 42795b22bf Installed eslint-plugin-react-hooks@next and added to ESLint config 2019-02-20 11:03:50 -08:00
Dan Abramov dab2fdbbbd Add eslint-plugin-react-hooks/exhaustive-deps rule to check stale closure dependencies (#14636)
* Add ESLint rule for useEffect/useCallback/useMemo Hook dependencies

* Fix ReactiveDependencies rule

* fix lint errors

* Support useLayoutEffect

* Add some failing tests and comments

* Gather dependencies in child scopes too

* If we don't find foo.bar.baz in deps, try foo.bar, then foo

* foo is enough for both foo.bar and foo.baz

* Shorter rule name

* Add fixable meta

* Remove a bunch of code and start from scratch

* [WIP] Only report errors from dependency array

This results in nicer editing experience. Also has autofix.

* Fix typo

* [Temp] Skip all tests

* Fix the first test

* Revamp the test suite

* Fix [foo] to include foo.bar

* Don't suggest call expressions

* Special case 'current' for refs

* Don't complain about known static deps

* Support useImperativeHandle

* Better punctuation and formatting

* More uniform message format

* Treat React.useRef/useState/useReducer as static too

* Add special message for ref.current

* Add a TODO case

* Alphabetize the autofix

* Only alphabetize if it already was

* Don't add static deps by default

* Add an undefined variable case

* Tweak wording

* Rename to exhaustive-deps

* Clean up / refactor a little bit
2019-02-20 18:18:58 +00:00
Josh R 1493abd7e0 Deleted empty App.css (#14149) 2019-02-19 15:49:34 -08:00
Brian Vaughn bec073365d Fix hooks warnings identified by prerelease version of react-hooks ESLint plugin 2019-02-19 13:15:57 -08:00
Sebastian Markbåge 13645d224d Deal with fallback content in Partial Hydration (#14884)
* Replace SSR fallback content with new suspense content

* The three states of a Dehydrated Suspense

This introduces three states for dehydrated suspense boundaries

Pending - This means that the tree is still waiting for additional data or
to be populated with its final content.

Fallback - This means that the tree has entered a permanent fallback state
and no more data from the server is to be expected. This means that the
client should take over and try to render instead. The fallback nodes will
be deleted.

Normal - The node has entered its final content and is now ready to be
hydrated.

* Rename retryTimedOutBoundary to resolveRetryThenable

This doesn't just retry. It assumes that resolving a thenable means that
it is ok to clear it from the thenable cache.

We'll reuse the retryTimedOutBoundary logic separately.

* Register a callback to be fired when a boundary changes away from pending

It's now possible to switch from a pending state to either hydrating
or replacing the content.
2019-02-19 13:07:41 -08:00
Dan Abramov c506ded3b2 Don't discard render phase state updates with the eager reducer optimization (#14852)
* Add test cases for setState(fn) + render phase updates

* Update eager state and reducer for render phase updates

* Fix a newly firing warning
2019-02-19 18:40:10 +00:00
Brian Vaughn a31415011d Removed numeric key code 2019-02-19 08:59:27 -08:00
Brian Vaughn 3376daaa41 Merge pull request #2 from Jessidhia/fix-utf-encoding
Fix encoding of Unicode keys greater than U+00FF
2019-02-19 08:56:21 -08:00
Jessica 044e6ba9cd Pass options to scrollIntoView 2019-02-19 16:36:43 +09:00
Jessica 65d493cae9 Just use codepoints as it'll be copied into an Uint32Array anyway 2019-02-19 16:03:53 +09:00
Jessica 4ee74f7e6c Fix encoding of Unicode keys greater than U+00FF (greater than U+FFFF handled by surrogate pairs) 2019-02-19 15:52:24 +09:00
Jessica 28ea0a352e Scroll to newly selected component if it's out of view 2019-02-19 12:22:19 +09:00
Brian Vaughn a4212dcdce Support editable props, state, and context values 2019-02-17 13:07:39 -08:00
Brian Vaughn 6c226b0c80 Added link to now.sh preview to README 2019-02-16 09:46:10 -08:00
Brian Vaughn c4d6fdbfdb Fixed overlay position bug 2019-02-16 08:33:38 -08:00
Brian Vaughn 1d95098177 Implemented select-DOM-element button 2019-02-16 08:29:26 -08:00
Brian Vaughn 2fbacbff01 Tab bar resizes properly for narrow screens 2019-02-15 11:42:55 -08:00
Brian Vaughn 0e67969cb1 Prompt to include UMD build artifact links in GitHub release (#14864) 2019-02-15 10:48:20 -08:00
Brian Vaughn fad0842fd4 Release scripts documentation (#14863)
* Improve release script process documentation
* Improved pre-publish instructions/message based on feedback
* Added reminder to attach build artifacts to GitHub release
2019-02-15 10:00:43 -08:00
Brian Vaughn 0008bb00d7 Inspectable complex hook values 2019-02-14 21:55:09 -08:00
Brian Vaughn 47a5fd59cb Reduced tree padding (left) slightly to make larger trees easier to inspect 2019-02-14 15:13:43 -08:00
Brian Vaughn 04a0d24f0f Fixed a potential source of duplicate key 2019-02-14 15:06:38 -08:00
Brian Vaughn 3f40d38203 Fixed edge case mutation bugs in selected element and tree context 2019-02-14 14:36:29 -08:00
Brian Vaughn bf2f13d32a Removed some stale TODO comments 2019-02-14 13:37:40 -08:00
Brian Vaughn 9cfa25bdcc Tidied up Flow types for Bridge and Store 2019-02-14 13:32:30 -08:00
Brian Vaughn b167dd339b Style, theme, and button CSS cleanup 2019-02-14 13:20:24 -08:00
Brian Vaughn a07d9862ca Fixed edge-case display density bug 2019-02-14 12:46:27 -08:00
overlookmotel ab7a67b1dc Fix react-dom/server context leaks when render stream destroyed early (#14706)
* Fix react-dom/server context memory retention

* Test for pollution of later renders

* Inline loop

* More tests
2019-02-14 19:50:23 +00:00
Brian Vaughn 15c5396169 Re-added "Settings" panel to browser extension and (hopefully) fixed a lot of sources of error 2019-02-14 11:45:11 -08:00
Dan Abramov 3e55560438 Release 16.8.2 2019-02-14 19:13:15 +00:00
Brian Vaughn 5a301cd26e Tweaked the owner stack exit icon 2019-02-14 09:23:54 -08:00
Dan Abramov dfabb77a97 Include another change in 16.8.2 v16.8.2 2019-02-14 17:21:27 +00:00
Sunil Pai c555c008b6 Include component stack in 'act(...)' warning (#14855)
* add a component stack trace to the act() warning

* pass tests

* nit
2019-02-14 17:20:49 +00:00
Brian Vaughn 36e596ecd1 Changed dark theme to have more React blues 2019-02-14 09:17:29 -08:00
Brian Vaughn 94aab74253 Avoid NPE in Agent if renderer can't be found for an ID 2019-02-14 08:13:35 -08:00