profile
viewpoint

lunaruan/react 1

A declarative, efficient, and flexible JavaScript library for building user interfaces.

mission-city-swing/mcs_registration 1

Mission City Swing Front Desk Registration

ashleybot/CarnieBots 0

Programming game for 3rd-5th graders

ldoubleuz/cmu-hci-capstone-2015-prototype 0

repo for hifi prototype of class project

lunaruan/babel 0

🐠 Babel is a compiler for writing next generation JavaScript.

lunaruan/flow 0

Adds static typing to JavaScript to improve developer productivity and code quality.

lunaruan/gestalt 0

A set of React UI components that supports Pinterest’s design language

lunaruan/inkpot 0

Inkpot 88/256 Colour Scheme for Vim

delete branch lunaruan/react

delete branch : add_auto_import

delete time in 5 days

push eventfacebook/react

Luna Ruan

commit sha d4f2b0379c8ecf8266497f863ee5a2aa612ff4ba

Add Auto Import to Babel Plugin (#16626) This babel transform is a fork of the @babel/plugin-transform-react-jsx transform and is for experimentation purposes only. We don't plan to own this code in the future, and we will upstream this to Babel at some point once we've proven out the concept. As per the RFC to simplify element creation, we want to add the ability to auto import "react' directly from the babel plugin. This commit updates the babel plugin with two options: 1.) importSource: The React module to import from. Defaults to react. 2.) autoImport: The type of import. Defaults to none. - none: Does not import React. JSX compiles to React.jsx etc. - namespace: import * as _react from "react";. JSX compiles to _react.jsx etc. - default: import _default from "react"; JSX compiles to _default.jsx etc. - namedExports: import {jsx as _jsx} from "react"; JSX compiles to _jsx etc. - require: var _react = _interopRequireWildcard(require("react"));. jSX compiles to _react.jsx etc. namespace, default, and namedExports can only be used when sourceType: module and require can only be used when sourceType: script. It also adds two pragmas (jsxAutoImport and jsxImportSource) that allow users to specify autoImport and importSource in the docblock.

view details

push time in 5 days

PR merged facebook/react

Reviewers
Add Auto Import to Babel Plugin CLA Signed React Core Team

This babel transform is a fork of the @babel/plugin-transform-react-jsx transform and is for experimentation purposes only. We don't plan to own this code in the future, and we will upstream this to Babel at some point once we've proven out the concept.

As per the RFC to simplify element creation, we want to add the ability to auto import "react' directly from the babel plugin. This commit updates the babel plugin with two options:

1.) importSource: The React module to import from. Defaults to react. 2.) shouldCacheImportFns: If this is set to true, React functions that are imported will be cached at the top of the file (ex. var _jsx = _react.jsx) instead of calling the member expression (ex. _react.jsx) directly in the code. Defaults to false. 3.) autoImport: The type of import. Defaults to none. - none: Does not import React. JSX compiles to React.jsx etc. - namespace: import * as _react from "react";. JSX compiles to _react.jsx etc. - default: import _default from "react"; JSX compiles to _default.jsx etc. - namedExports: import {jsx as _jsx} from "react"; JSX compiles to _jsx etc. - require: var _react = _interopRequireWildcard(require("react"));. jSX compiles to _react.jsx etc.

namespace, default, and namedExports can only be used when sourceType: module and require can only be used when sourceType: script.

We plan to test #16432 before landing this diff.

+836 -689

9 comments

6 changed files

lunaruan

pr closed time in 5 days

push eventlunaruan/react

Luna Ruan

commit sha ac7d715e926693872a5159a56e6d35a9b485ac2d

re-remove create element tests because merge added it back

view details

push time in 5 days

push eventlunaruan/react

Luna Ruan

commit sha a95099fb04dd91cf1d75155e668a7d1be6890222

git fix build code frame in tests

view details

push time in 5 days

push eventlunaruan/react

Andrew Clark

commit sha 95bd7aad7daa80c381faa3215c80b0906ab5ead5

Remove renderPhaseUpdates Map (#17625) * Remove renderPhaseUpdates Map Follow up to #17484, which was reverted due to a bug found in www. * Failing test: Dropped updates When resetting render phase updates after a throw, we should only clear the pending queue of hooks that were already processed. * Fix non-render-phase updates being dropped Detects if a queue has been processed by whether the hook was cloned. If we change the implementation to an array instead of a list, we'll need some other mechanism to determine whether the hook was processed. * Regression test: startTransition in render phase useTransition uses the state hook as part of its implementation, so we need to fork it in the dispatcher used for re-renders, too.

view details

Dominic Gannaway

commit sha a209a97ed742ced488d7edf4fc2dcbf316ba13cb

Add feature flag around React.createFactory (#17873)

view details

Dominic Gannaway

commit sha 9fd760ce75fd76716888997852ca85394eeab49a

Add disable <textarea/> children flag (#17874)

view details

Sebastian Markbåge

commit sha 0c04acaf8955d3f754ec894abfc7586cbf3220dc

Remove FB specific build (#17875) I moved unstable_SuspenseList internally. We don't need the FB build. I plan on also removing the ReactDOM fb specific entry. We shouldn't add any more FB specific internals nor APIs. If they're experimental they should go onto the experimental builds to avoid too many permutations.

view details

Dominic Gannaway

commit sha f2fd484afdee1e4e25ee453bb7a544fa0558d172

Add React.createFactory() deprecation warning (#17878)

view details

Dominic Gannaway

commit sha c322f5913f5ec4f0f8d7926ba7401e94c0aaa772

Add unstable_renderSubtreeIntoContainer and unstable_createPortal feature flags (#17880)

view details

Sebastian Markbåge

commit sha cf7a0c24d4640f07d465c5a67aab2639ddd5d0a9

Remove dynamic GKs for selective/train (#17888) There are shipped/shipping.

view details

Nicolas Gallagher

commit sha 6c00c5bba4d2272de6975c124ab6dc29abb629c8

Update to flow-bin@0.89 (#17842)

view details

Luna Ruan

commit sha 3b3decf87121dcc20bfc0820b7b35d2b028adaf2

add warning when owner and self are different for string refs (#17864) When owner and self are different for string refs, we can't easily convert them to callback refs. This PR adds a warning for string refs when owner and self are different to tell users to manually update these refs.

view details

Simen Bekkhus

commit sha 3c713d513195a53788b3f8bb4b70279d68b15bcc

chore: update to latest release of babel (#17897)

view details

Nicolas Gallagher

commit sha 9d09052d2f14a238285352f3156bbe034451bc7b

Update various monorepo dependencies (#17901)

view details

Nicolas Gallagher

commit sha 81e30c7ff67d4c5d6e9b9f2bb3d9af44bd40c621

Remove unused modules from legacy event responders (#17907)

view details

Nicolas Gallagher

commit sha 6faf6f5eb1705eef39a1d762d6ee381930f36775

Update to flow 0.97 (#17892)

view details

Simen Bekkhus

commit sha cf0081263ced42ddebe0a0d868701890448bfd4b

Upgrade to jest 25 (#17896) The changes to the test code relate to changes in JSDOM that come with Jest 25: * Several JSDOM workarounds are no longer needed. * Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers. * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh * JSDOM no longer triggers default actions when dispatching click events. * https://codesandbox.io/s/beautiful-cdn-ugn8f * JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent. * JSDOM now supports passive events. * JSDOM has improved support for custom CSS properties. * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.

view details

Brian Vaughn

commit sha e26682a9f3889439765942f1510f280466c3433a

Removed Root API callback params and added warnings (#17916)

view details

Dominic Gannaway

commit sha b7f217d40c6c8c973c86fabceeda238b38662171

[Concurrent Mode] Add missing event plugin priorities (#17914)

view details

Dan Abramov

commit sha 29a1559619a4f7b63cc2a824482e86e6e9886938

Add semver dependency explicitly to DevTools (#17919)

view details

Dan Abramov

commit sha a8fce06d3efd52834de0e63c72ee77c2b267b48c

Fix Jest diff call (#17921)

view details

Dan Abramov

commit sha 57333ca33a0619ff2334e4eb19139b4c7e9830f7

Show first component stack in context warning (#17922) * Update tests * Show first component stack in context warning Co-authored-by: Dominic Gannaway <trueadm@users.noreply.github.com>

view details

Dan Abramov

commit sha faabe22b4f5b5812dc756b437465a3c519f6d872

Use next tag for canary releases in the doc (#17923)

view details

push time in 5 days

push eventlunaruan/react

Luna Ruan

commit sha 0123a37474b436971a80f1b4c05a6d0de970ea59

fixed lint error and cleaned up createElement and shouldCacheImportFns

view details

push time in 6 days

push eventlunaruan/react

Luna Ruan

commit sha 109efd313813a19ee6b9e3ba38c2505eab60638e

fixed lint error and cleaned up createElement and shouldCacheImportFns

view details

push time in 6 days

push eventlunaruan/react

Nicolas Gallagher

commit sha c5e7190ed4af266bbc636bda08e766fce9ee68a7

[react-interactions] Press with useRef instead of useState (#16870) We only need to read and modify the value for the lifetime of the hook

view details

Andrew Clark

commit sha 8b580a89d6dbbde8a3ed69475899addef1751116

Idle updates should not be blocked by hidden work (#16871) * Idle updates should not be blocked by hidden work Use the special `Idle` expiration time for updates that are triggered at Scheduler's `IdlePriority`, instead of `Never`. The key difference between Idle and Never¹ is that Never work can be committed in an inconsistent state without tearing the UI. The main example is offscreen content, like a hidden subtree. ¹ "Never" isn't the best name. I originally called it that because it "never" expires, but neither does Idle. Since it's mostly used for offscreen subtrees, we could call it "Offscreen." However, it's also used for dehydrated Suspense boundaries, which are inconsistent in the sense that they haven't finished yet, but aren't visibly inconsistent because the server rendered HTML matches what the hydrated tree would look like. * Reset as early as possible using local variable * Updates in a hidden effect should be Idle I had made them Never to avoid an extra render when a hidden effect updates the hidden component -- if they are Idle, we have to render once at Idle, which bails out on the hidden subtree, then again at Never to actually process the update -- but the problem of needing an extra render pass to bail out hidden updates already exists and we should fix that properly instead of adding yet another special case.

view details

Jessica Franco

commit sha 18d2e0c03e4496a824fdb7f89ea2a3d60c30d49a

Warning system refactoring (part 1) (#16799) * Rename lowPriorityWarning to lowPriorityWarningWithoutStack This maintains parity with the other warning-like functions. * Duplicate the toWarnDev tests to test toLowPriorityWarnDev * Make a lowPriorityWarning version of warning.js * Extract both variants in print-warning Avoids parsing lowPriorityWarning.js itself as the way it forwards the call to lowPriorityWarningWithoutStack is not analyzable.

view details

Dominic Gannaway

commit sha 68a87eee544b2bcdff66c751e07cb55939b9d8ca

[react-interactions] Add FocusList component (#16875)

view details

Dominic Gannaway

commit sha 793f176dad4544363149098cc56eb2abff687fe2

[react-interactions] Make FocusList bundle (#16876)

view details

Dominic Gannaway

commit sha ebc299fc2f21a74fffa3f8aa2209259d98702156

[react-interactions] TabFocus -> FocusManager (#16874)

view details

Joshua Gross

commit sha 32e5c97d11e390e6a3d3ce6a2ab7443daed09747

[React Native] Improve errors for invalid ViewConfig getter functions (#16879) * [React Native] Improve logging for missing view configs and invalid view config getter functions * [React Native] Improve logging for missing view configs and invalid view config getter functions

view details

Dominic Gannaway

commit sha d0ebde77f6d1232cefc0da184d731943d78e86f2

[react-interactions] Add initial docs explaining React Scopes (#16892)

view details

Dominic Gannaway

commit sha d6d83d7060388c6b1b3bc0a28708995de6240ce3

[react-interactions] Add Portal propagation configuration (#16889)

view details

Sebastian Markbåge

commit sha 0d8c0cd0968150e187ed7132315521d78a5abf61

These flags are hard coded in our internal config (#16883) By hard coding them here they can get properly DCE and don't have to be sent to users. The internal config should only have dynamic flags.

view details

Sebastian Markbåge

commit sha a06d181af081a17bea466eef2bae1bdaaf8a4b5e

Include tag in begin/complete invariant (#16881)

view details

Dominic Gannaway

commit sha 7c3bd08b3767ed69ddf398176de58214561194a0

[react-interactions] Add more documentation for a11y components (#16894)

view details

Dominic Gannaway

commit sha 57bf275fbd89afc9afb84cefb950eb74c3573ea7

[devtools] Add support for React Scope symbol/number (#16893)

view details

Brian Vaughn

commit sha fa1a3262271be165820fa51daeb036ba260205a3

Update useEditableValue hook to sync external value changes (#16878) * Update useEditableValue to mirror value cahnges Previously, the hook initialized local state (in useState) to mirror the prop/state value. Updates to the value were ignored though. (Once the state was initialized, it was never updated.) The new hook updates the local/editable state to mirror the external value unless there are already pending, local edits being made. * Optimistic CHANGELOG update * Added additional useEditableValue() unit test cases

view details

Dominic Gannaway

commit sha 4bb0e96b4b0dd5db4bb349cd27425e5594970eb3

[react-interactions] FocusTable key press bound propgataion (#16895)

view details

Sebastian Markbåge

commit sha 3694a3b5e9a5a3c80d47f9889a17d8337573d513

Selective Hydration (#16880) * Add Feature Flag for Selective Hydration * Enable Synchronous Hydration of Discrete Events * Resolve cyclic dependency

view details

David Huang

commit sha 49b0cb6db8e4a32b6523d5e538578d9d9c6db592

Moving backend injection to the content script (#16900)

view details

Dominic Gannaway

commit sha b9811ed5bc710f6318eed6292ad76e4874ac7f99

[react-interactions] Add wrapping support to FocusList/FocusTable (#16903)

view details

Brian Vaughn

commit sha 84e83db1ee6303bc31120af59e20750a0fa299bc

Updated DevTools CHANGELOG

view details

Brian Vaughn

commit sha b6606ecba80b591ea66db1e2ee1fed72befb4c32

DevTools shows unsupported renderer version dialog (#16897) * DevTools shows unsupported renderer version dialog * Optimistic CHANGELOG udpate

view details

push time in 7 days

PR opened facebook/react

Reviewers
Ship React.jsx and React.jsxDEV

This PR removes React.jsx and React.jsxDEV froom behind the enableJSXTransformAPI feature flag so that we can use it for React Native and in future Babel versions.

+9 -24

0 comment

9 changed files

pr created time in 7 days

create barnchlunaruan/react

branch : turn_on_jsx

created branch time in 7 days

PR closed facebook/react

Reviewers
Portals trigger Suspense boundaries in SSR and only render on client CLA Signed React Core Team

Currently during SSR, rendering a Portal throws an error. However, in Concurrent Mode, if a Portal is wrapped in a Suspense boundary, instead of throwing an err, we want to trigger the closest Suspense fallback instead. Then during hydration, we can render the Portal. If a Portal isn't wrapped in a Suspense boundary, we will still throw an error to remain consistent with the previous implementation.

+93 -25

3 comments

4 changed files

lunaruan

pr closed time in 14 days

Pull request review commentfacebook/react

Portals trigger Suspense boundaries in SSR and only render on client

 describe('ReactDOMServerPartialHydration', () => {     // Now we're hydrated.     expect(ref.current).not.toBe(null);   });++  it('should return fallback during server rendering when Portal has a suspense boundary ', () => {+    const portalContainer = document.createElement('div');

Good point! Will have to rethink this. Thanks for the feedback.

lunaruan

comment created time in 14 days

PR opened facebook/react

Reviewers
Portals trigger Suspense boundaries in SSR and only render on client

Currently during SSR, rendering a Portal throws an error. However, in Concurrent Mode, if a Portal is wrapped in a Suspense boundary, instead of throwing an err, we want to trigger the closest Suspense fallback instead. Then during hydration, we can render the Portal. If a Portal isn't wrapped in a Suspense boundary, we will still throw an error to remain consistent with the previous implementation.

+93 -25

0 comment

4 changed files

pr created time in 14 days

create barnchlunaruan/react

branch : portals

created branch time in 14 days

PR closed facebook/react

Reviewers
Portals trigger Suspense boundaries in SSR and only render on client CLA Signed React Core Team

Currently during SSR, rendering a Portal throws an error. However, in Concurrent Mode, if a Portal is wrapped in a Suspense boundary, instead of throwing an err, we want to trigger the closest Suspense fallback instead. Then during hydration, we can render the Portal. If a Portal isn't wrapped in a Suspense boundary, we will still throw an error to remain consistent with the previous implementation.

+93 -25

4 comments

4 changed files

lunaruan

pr closed time in 14 days

pull request commentfacebook/react

Portals trigger Suspense boundaries in SSR and only render on client

Wrong branch

lunaruan

comment created time in 14 days

push eventfacebook/react

Luna Ruan

commit sha 628f6f50b514529101a142242846985f7b4be048

Portals trigger Suspense boundaries in SSR and only render on client

view details

push time in 14 days

PR opened facebook/react

Portals trigger Suspense boundaries in SSR and only render on client

Currently during SSR, rendering a Portal throws an error. However, in Concurrent Mode, if a Portal is wrapped in a Suspense boundary, instead of throwing an err, we want to trigger the closest Suspense fallback instead. Then during hydration, we can render the Portal. If a Portal isn't wrapped in a Suspense boundary, we will still throw an error to remain consistent with the previous implementation.

+93 -25

0 comment

4 changed files

pr created time in 14 days

push eventfacebook/react

Luna Ruan

commit sha 9b78e66d949cd0ae5946d98d7716598d6b717c31

Portals trigger Suspense boundaries in SSR and only render on client

view details

push time in 14 days

create barnchfacebook/react

branch : portals

created branch time in 14 days

pull request commentfacebook/react

Add Auto Import to Babel Plugin

This PR has not been abandoned. Still working on adding it to WWW.

lunaruan

comment created time in a month

PR closed facebook/react

Remove workInProgressRootLatestSuspenseTimeout CLA Signed React Core Team

Remove workInProgressRootLatestSuspenseTimeout field from the work loop in preparation for splitting timeout from expiration time.

+15 -13

3 comments

1 changed file

lunaruan

pr closed time in a month

push eventfacebook/react

Luna Ruan

commit sha 3b3decf87121dcc20bfc0820b7b35d2b028adaf2

add warning when owner and self are different for string refs (#17864) When owner and self are different for string refs, we can't easily convert them to callback refs. This PR adds a warning for string refs when owner and self are different to tell users to manually update these refs.

view details

push time in a month

PR merged facebook/react

Reviewers
Add different string ref warning when owner and self are different CLA Signed React Core Team

When owner and self are different for string refs, we can't easily convert them to callback refs. This PR adds a warning for string refs for everyone when owner and self are different to tell users to manually update these refs.

+91 -2

3 comments

3 changed files

lunaruan

pr closed time in a month

push eventlunaruan/react

Luna Ruan

commit sha ff93a34ddfe5a82f1bab6f486c53a773511b7ff7

add warning when owner and self are different for string refs

view details

push time in a month

push eventlunaruan/react

Luna Ruan

commit sha debdb1bbba27f793784aa3d9d65dbd693d66e30d

add warning when owner and self are different for string refs

view details

push time in a month

push eventlunaruan/react

Luna Ruan

commit sha d8a2020d911e88f31c6a187ad8139b22bbefa19a

add warning when owner and self are different for string refs

view details

push time in a month

push eventlunaruan/react

Luna Ruan

commit sha 75a0552f5dfd91f7c9ef07d3a2c748df6523bd0b

add warning when owner and self are different for string refs

view details

push time in a month

push eventlunaruan/react

Luna Ruan

commit sha 6cb196bb4b9bd31a5df952e7a4b8ba660ce1af2d

add warning when owner and self are different for string refs

view details

push time in a month

push eventlunaruan/react

Dominic Gannaway

commit sha f30ccb9ed9248cb59cdd68dde66e3971afaaa594

[react-interactions] Fix unatached fiber bug (#17371)

view details

Dominic Gannaway

commit sha 532810a370cdb89eb12749f6e1cd59dd73acbeb4

[react-interactions] FocusWithin beforeblur propagation fix (#17375)

view details

Sebastian Markbåge

commit sha 39dbb14da321cabafe3ab67de41150672aa301fc

[Flight] Move Flight DOM to a Webpack Specific Package (#17372) * Move Flight DOM to Webpack Specific Packagee We'll have Webpack specific coupling so we need to ensure that it can be versioned separately from various Webpack versions. We'll also have builds for other bundlers in the future. * Move to peerDep * Move DOM Flight Tests * Merge ReactFlightIntegration into ReactFlightDOM This was an integration test. We can add to it. * Fix fixture paths

view details

Sebastian Markbåge

commit sha 8e74a31b2d0017061e265ae1a3fbfbacb7af5614

Add Webpack as devDependency (#17379) This is now used by the Flight package so it needs to be installed as a peer.

view details

Andrew Clark

commit sha 2586303662736d72e79046b51c8df993b21e6093

[Bugfix] Pending state is always user-blocking (#17382) Fixes a bug where `isPending` is only set to `true` if `startTransition` is called from inside an input event. That's usually the case, but not always. Now it works regardless of where you call it.

view details

David Garner

commit sha a807c307c496d96e8ff79f53cf2d6203c45cf0c6

[eslint] Check forwardRef callbacks (#17255) * [eslint] Check forwardRef callbacks (#17220) * [eslint] Make tests more realistic (#17220) * [eslint] Check anonymous callback of React.memo for rules-of-hooks (#17220) * [eslint] Add tests for callbacks not known to be components (#17220) * [eslint] Correct comments and add another test (#17220)

view details

Andrew Clark

commit sha 1f2da0babd723f1b479f84cef5a0ea4fedac3959

Forgot to mark test as experimental (#17391)

view details

Sebastian Markbåge

commit sha 3ad076472ce9108b9b8a6a6fe039244b74a34392

Update Fixtures to use new APIs (#17380) Also renamed unstable-async to concurrent

view details

Dominic Gannaway

commit sha a7d07ff24d8d3d925ab45f5eb9be42a62a345dad

[react-interactions] Rename Flare listeners prop to DEPRECATED_flareListeners (#17394)

view details

Dominic Gannaway

commit sha 3fdfa231ad4bbe81516866dc9cd7ed5d18acf223

[react-interactions] Refine virtual click detection for FF+JAWS/NVDA (#17422)

view details

Dominic Gannaway

commit sha 007a276b6541f98318adf5d37668fceb5ef37223

[react-interactions] Fix memory leak in event responder system (#17421)

view details

Dan Abramov

commit sha 237a966da058fa063abd2e1365e90f2a26aa4e51

[Fresh] Fix an infinite loop in an edge case (#17414) * [Fresh] Fix an infinite loop in an edge case * Make it work in IE11

view details

Andrew Clark

commit sha 54f66731c84e3f141a1c0bc5d32be7cc5d4b9bbf

Update release script URL (#17428) CircleCI API endpoint changed

view details

Dan Abramov

commit sha 6470e0f169b4cf0416132aa66221bf20e264c618

[Fresh] Make all errors recoverable (#17438) * [Fresh] Detect root updates more reliably * [Fresh] Use WeakMap for root elements * [Fresh] Make initial failures recoverable too * Fix DevTools check * Fix wrong flow type

view details

Brian Vaughn

commit sha 5fc97420b95d36e50a064ec351d2fedca22e9464

Remove dependency on local git checkout from build process (#17475) * Remove dependency on local git checkout from build process * Updated Webpack dependencies to account for recent changes to deps for Flight

view details

Brian Vaughn

commit sha 3816ae7c3860f3efd013d95259b5a93ae27f8f39

DevTools version bump 4.2.0 -> 4.2.1

view details

Dan Abramov

commit sha 969f4b5bb8302afb3eb1656784130651047c3718

Change DevTools hook warning message (#17478)

view details

Sung M. Kim

commit sha b64938e1234b77c50d9b2680dd836cd27ce5ad91

Fixed changelog formatting #17481 (#17487)

view details

Sebastian Markbåge

commit sha 79572e34d18c67768c93b1a4d60703a5929363a3

Adjust SuspenseList CPU bound heuristic (#17455) * Adjust SuspenseList CPU bound heuristic In SuspenseList we switch to rendering fallbacks (or stop rendering further rows in the case of tail="collapsed/hidden") if it takes more than 500ms to render the list. The limit of 500ms is similar to the train model and designed to be short enough to be in the not noticeable range. This works well if each row is small because we time the 500ms range well. However, if we have a few large rows then we're likely to exceed the limit by a lot. E.g. two 480ms rows hits almost a second instead of 500ms. This PR adjusts the heuristic to instead compute whether something has expired based on the render time of the last row. I.e. if we think rendering one more row would exceed the timeout, then we don't attempt. This still works well for small rows and bails earlier for large rows. The expiration is still based on the start of the list rather than the start of the render. It should probably be based on the start of the render but that's a bigger change and needs some thought. * Comment

view details

Sebastian Markbåge

commit sha d75323f65d0f263dd4b0c15cebe987cccf822783

Remove case that only exists for createBatch (#17506) The comment says this is only needed for createBatch().commit() which doesn't exist anymore.

view details

push time in a month

push eventlunaruan/react

Luna Ruan

commit sha 3bd634a931cefe8572128d337475e59ea3cba624

add warning when owner and self are different for string refs

view details

push time in a month

PR opened facebook/react

Reviewers
Add different string ref warning when owner and self are different

When owner and self are different for string refs, we can't easily convert them to callback refs. This PR adds a warning for string refs (also behind the warnAboutStringRefs flag) when owner and self are different to tell users to manually update these refs.

+73 -9

0 comment

2 changed files

pr created time in a month

create barnchlunaruan/react

branch : string_ref_warn

created branch time in a month

PR closed facebook/react

Reviewers
Added unstable_do_not_use_getDOMNodes to Suspense boundaries CLA Signed React Core Team

Added ability to get child DOM nodes from suspense boundaries after the children of a suspense boundary unsuspends or during mount if children do not suspend

+306 -2

4 comments

9 changed files

lunaruan

pr closed time in a month

pull request commentfacebook/react

Added unstable_do_not_use_getDOMNodes to Suspense boundaries

Closing this for now because Sebastian came up with an alternative idea for TTI tracking that doesn't rely on React.

lunaruan

comment created time in a month

issue closedfacebook/react

Error: "f.hasOwnProperty is not a function"

Describe what you were doing when the bug occurred:

  1. Opened components tree
  2. Clicked Context.Provider
  3. Clicked "SomeProvider" component right above that Context.Provider

This issue does not happen if I click "SomeProvider" first. only after clicking Context.Provider within this "SomeProvider" wrapper component.


Please do not remove the text below this line

DevTools version: 4.3.0-3e0967783

Call stack: at ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:268899) at ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59363) at Sl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:107431) at Ic (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99973) at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99898) at vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:96672) at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46436 at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:3676) at $o (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46146) at na (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:46382)

Component stack: in ha in div in ya in Ea in div in div in ya in Ea in div in Unknown in div in bi in div in Ai in Suspense in ei in div in div in la in Ur in vo in Unknown in n in Unknown in div in div in Qi in Ve in nn in Da in Yc

closed time in a month

MichaelOstrovsky

issue commentfacebook/react

Error: "f.hasOwnProperty is not a function"

Hello! Thanks for reporting this issue. This bug was most likely fixed in #17768 for v4.4.0. Fortunately that version went live in the Chrome store a couple of days ago, so it should be deployed to your browser soon!

I'm going to close this issue since it's been fixed on our end. If you're still able to reproduce it with version 4.4.0 please let us know and we'll reopen the issue. cc: @bvaughn

MichaelOstrovsky

comment created time in a month

issue closedfacebook/react

emoji in useState string makes useState stop working

I am running on latest React. When I try to use unicode emojis in a useState string, the useState function stops updating the string.

Example:

const [text, setText] = useState('😀');

console.log(text);

Emoji will be visibile in console log. However, when I run:

setText('different text');

text now is an empty string.

What is happening? Why? How can I solve it?

closed time in a month

TheRav3n

issue commentfacebook/react

emoji in useState string makes useState stop working

Hello! I created a Codesandbox and I could not reproduce this issue. https://codesandbox.io/s/competent-meadow-zetlm

I'm going to close this issue for now because it seems like it's working as expected. If you are able to share a repro with us, we'll take a look and reopen the issue.

TheRav3n

comment created time in a month

issue closedfacebook/react

[DevTools] Component inspector not loading for large components

Do you want to request a feature or report a bug? Bug report.

What is the current behavior? The component inspector works fine on most components, but on ones that are particularly large with many large props it is stuck on "Loading...".

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below: You should be able to reproduce the issue on: https://data.world/jonloyens/an-intro-to-dataworld-dataset

Navigate to the component with the key: "jonloyens/an-intro-to-dataworld-dataset". Other components above and below that one will load, but that one specifically will not.

What is the expected behavior? It should load the component tree eventually. Previous to the 4.3.0 update these components loaded fine.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Our app uses React version 16.8.3. I am on dev tools version 4.3.0 on Chrome 79.0.3945.88 on MacOS Catalina 10.15.2 (but others on earlier versions of MacOS are having the same issue).

I have a suspicion that this may be related to https://github.com/facebook/react/pull/17579 as this change has made a big impact on our app (mostly in a good way). We use ImmutableJS, and that change has made it much easier to navigate Immutable props since it preloads the values. The component that is loading slowly uses a proportionately large number of Immutable props to other components.

closed time in a month

katz12

issue commentfacebook/react

[DevTools] Component inspector not loading for large components

Hey! Thanks for the repro steps. I've tried it with the latest version of the extension and it looks like the bug no longer happens. I think that's because it was fixed in #17233, but that version has not yet deployed to your browser. Fortunately that version went live in the Chrome store yesterday evening, so it should deploy to you soon! I'm going to close this issue since it's been fixed on our end. If you're still able to reproduce it with version 4.4.0 please let us know and we'll reopen the issue. cc: @bvaughn

katz12

comment created time in a month

issue commentfacebook/react

Get Dom Element by Component Name

cc: @bvaughn

bradenhs

comment created time in a month

issue closedfacebook/react

In React and react-dom 16 Upgrade, getting error: Uncaught TypeError: Cannot read property 'input' of undefined

I am trying to upgrade my Reactjs and react-dom versions from v15.6.2 to ^v16.0.0 and am getting the above error.

Clicking through the error in the console, I see that the _React$DOM is undefined. I have followed all the migration instructions on the React.org site and looked extensively, but cannot seem to get rid of this error on versions of react and react-dom of v16 and above.

Any ideas on what that issue is and how I can resolve it?

Below are my package.json and webpack.config. They are pre-upgrade to v16, but I have tried adding core-js per Reactjs.org.

var _React$DOM = _react2.default.DOM,
    input = _React$DOM.input, <<< Here is the highlighted error
    select = _React$DOM.select,
    textarea = _React$DOM.textarea;
My dependencies in package.json:
"devDependencies": {
   "babel-loader": "^7.1.5",
   "babel-preset-es2015": "^6.1.18",
   "babel-preset-react": "^6.1.18",
   "babel-preset-stage-0": "^6.24.1",
   "chai": "^4.1.2",
   "chai-jquery": "^2.0.0",
   "css-loader": "^1.0.0",
   "eslint-config-rallycoding": "^3.2.0",
   "mocha": "^5.2.0",
   "react-addons-test-utils": "^15.0.1",
   "style-loader": "^0.21.0",
   "webpack-cli": "^3.1.0",
   "webpack-dev-server": "^3.1.8"
 },
 "dependencies": {
   "actioncable": "^5.2.4",
   "axios": "^0.18.0",
   "babel-core": "^6.2.1",
   "babel-polyfill": "^6.26.0",
   "babel-preset-stage-1": "^6.1.18",
   "cloudinary-core": "^2.5.0",
   "cloudinary-react": "^1.0.6",
   "dotenv-webpack": "^1.5.5",
   "file-loader": "^2.0.0",
   "jquery": "^3.3.1",
   "jsdom": "^12.0.0",
   "lodash": "^4.1.0",
   "prop-types": "^15.6.1",
   "react": "^15.6.2",
   "react-bootstrap": "^0.32.1",
   "react-day-picker": "^7.1.6",
   "react-dom": "^15.6.2",
   "react-dropzone": "^5.0.1",
   "react-helmet": "^5.2.0",
   "react-redux": "^5.0.7",
   "react-router-dom": "^4.3.1",
   "react-stripe-elements": "^2.0.1",
   "redux": "^4.0.0",
   "redux-form": "^7.4.2",
   "redux-thunk": "^2.2.0",
   "sha1": "^1.1.1",
   "webpack": "^4.17.2"
 }

My webpack.config:

const webpack = require('webpack');
const Dotenv = require('dotenv-webpack');
const raf = require('raf')

const path = require('path');


module.exports = {
  mode: 'none',
  watch: false,
  entry: [
    'babel-polyfill', './src/index.js'
  ],
  output: {
    path: __dirname,
    publicPath: '/',
    filename: 'bundle.js'
  },
  module: {
    rules: [
      {
        test: /\.(jpg|png|svg)$/,
        use: [
          {
            loader: 'file-loader',
            options: {
              name: '[path][name].[hash].[ext]'
            }
          }
        ]
      },
      {
        test: /\.js?$/,
        exclude: /node_modules/,
        use:
          { loader: 'babel-loader',
        options: {
         presets: ['react', 'es2015', 'stage-0']
       }
      }
    }

    ] // end of loaders

  devServer: {
    historyApiFallback: true,
    contentBase: './'
  },
  plugins: [
    new webpack.DefinePlugin({
      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
    }),
    new Dotenv()
  ]
};

closed time in a month

chikarao

issue commentfacebook/react

In React and react-dom 16 Upgrade, getting error: Uncaught TypeError: Cannot read property 'input' of undefined

This type of question is probably better suited for Stack Overflow or /r/reactjs, so I'm going to go ahead and close the issue and suggest you maybe continue the conversation on one of those two sites.

You should try what @threepointone suggested first, but if this doesn't work you should share a link to your project so others can reproduce the error that you're seeing. Good luck!

chikarao

comment created time in a month

issue closedfacebook/react

Error: "Could not find node with id "27720" in commit tree"

Describe what you were doing when the bug occurred: 1. 2. 3.


Please do not remove the text below this line

DevTools version: 4.3.0-3e0967783

Call stack: at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159833 at Map.forEach (<anonymous>) at commitIndex (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159779) at e.getRankedChartData (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:160302) at Sl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:322998) at ii (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59363) at qi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:67999) at Sl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:108660) at Ic (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99973) at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:99898)

Component stack: in Sl in div in div in div in vo in Unknown in n in Unknown in div in div in Qi in Ve in nn in Da in Yc

closed time in a month

vkouk

issue commentfacebook/react

Error: "Could not find node with id "27720" in commit tree"

Duplicate of #16446, hopefully fixed via #17771. The fix rolled out to the Chrome store late yesterday and will hopefully deploy sometime within the next day.

vkouk

comment created time in a month

push eventlunaruan/react

Luna Ruan

commit sha 1c30aaecfe4ddbf79ad2523bbf8aa77548e2b7f1

fix lint errors

view details

push time in 2 months

push eventlunaruan/react

Luna Ruan

commit sha 38bb17f663659e4cc363935645e0fd71a07746d6

remove extra code in setAttribut.js

view details

push time in 2 months

push eventlunaruan/react

Luna Ruan

commit sha 7a15980b6192498b15a31c799ad4167a0efe16a6

fixed lint and flow

view details

push time in 2 months

push eventlunaruan/react

Dominic Gannaway

commit sha fc43644eba08256464edb125adce2027cdbdca30

[react-interactions] Follow up active element blur logic (#17364)

view details

Dominic Gannaway

commit sha df8db4e005573d3cd793f9a6406e97e6014d5545

[react-interactions] Enable event system before dispatching blur (#17365)

view details

Ricky

commit sha 769dd522a2f6843f7e22d903fce296cb9faab88b

[Fast Refresh] Fix for intentional unmounts after an error (#17368)

view details

Luna Ruan

commit sha 9a5f28dbedc2b2edd01d216e347ab24b8efa73fc

update version numbers for 16.12

view details

Luna Ruan

commit sha 1832f832c51dc58b57cb012767fae5814f31b016

Changelog for 16.12

view details

Dominic Gannaway

commit sha f30ccb9ed9248cb59cdd68dde66e3971afaaa594

[react-interactions] Fix unatached fiber bug (#17371)

view details

Dominic Gannaway

commit sha 532810a370cdb89eb12749f6e1cd59dd73acbeb4

[react-interactions] FocusWithin beforeblur propagation fix (#17375)

view details

Sebastian Markbåge

commit sha 39dbb14da321cabafe3ab67de41150672aa301fc

[Flight] Move Flight DOM to a Webpack Specific Package (#17372) * Move Flight DOM to Webpack Specific Packagee We'll have Webpack specific coupling so we need to ensure that it can be versioned separately from various Webpack versions. We'll also have builds for other bundlers in the future. * Move to peerDep * Move DOM Flight Tests * Merge ReactFlightIntegration into ReactFlightDOM This was an integration test. We can add to it. * Fix fixture paths

view details

Sebastian Markbåge

commit sha 8e74a31b2d0017061e265ae1a3fbfbacb7af5614

Add Webpack as devDependency (#17379) This is now used by the Flight package so it needs to be installed as a peer.

view details

Andrew Clark

commit sha 2586303662736d72e79046b51c8df993b21e6093

[Bugfix] Pending state is always user-blocking (#17382) Fixes a bug where `isPending` is only set to `true` if `startTransition` is called from inside an input event. That's usually the case, but not always. Now it works regardless of where you call it.

view details

David Garner

commit sha a807c307c496d96e8ff79f53cf2d6203c45cf0c6

[eslint] Check forwardRef callbacks (#17255) * [eslint] Check forwardRef callbacks (#17220) * [eslint] Make tests more realistic (#17220) * [eslint] Check anonymous callback of React.memo for rules-of-hooks (#17220) * [eslint] Add tests for callbacks not known to be components (#17220) * [eslint] Correct comments and add another test (#17220)

view details

Andrew Clark

commit sha 1f2da0babd723f1b479f84cef5a0ea4fedac3959

Forgot to mark test as experimental (#17391)

view details

Sebastian Markbåge

commit sha 3ad076472ce9108b9b8a6a6fe039244b74a34392

Update Fixtures to use new APIs (#17380) Also renamed unstable-async to concurrent

view details

Dominic Gannaway

commit sha a7d07ff24d8d3d925ab45f5eb9be42a62a345dad

[react-interactions] Rename Flare listeners prop to DEPRECATED_flareListeners (#17394)

view details

Dominic Gannaway

commit sha 3fdfa231ad4bbe81516866dc9cd7ed5d18acf223

[react-interactions] Refine virtual click detection for FF+JAWS/NVDA (#17422)

view details

Dominic Gannaway

commit sha 007a276b6541f98318adf5d37668fceb5ef37223

[react-interactions] Fix memory leak in event responder system (#17421)

view details

Dan Abramov

commit sha 237a966da058fa063abd2e1365e90f2a26aa4e51

[Fresh] Fix an infinite loop in an edge case (#17414) * [Fresh] Fix an infinite loop in an edge case * Make it work in IE11

view details

Andrew Clark

commit sha 54f66731c84e3f141a1c0bc5d32be7cc5d4b9bbf

Update release script URL (#17428) CircleCI API endpoint changed

view details

Dan Abramov

commit sha 6470e0f169b4cf0416132aa66221bf20e264c618

[Fresh] Make all errors recoverable (#17438) * [Fresh] Detect root updates more reliably * [Fresh] Use WeakMap for root elements * [Fresh] Make initial failures recoverable too * Fix DevTools check * Fix wrong flow type

view details

Brian Vaughn

commit sha 5fc97420b95d36e50a064ec351d2fedca22e9464

Remove dependency on local git checkout from build process (#17475) * Remove dependency on local git checkout from build process * Updated Webpack dependencies to account for recent changes to deps for Flight

view details

push time in 2 months

fork lunaruan/prop-types

Runtime type checking for React props and similar objects

fork in 2 months

PR opened facebook/react

Reviewers
Remove workInProgressRootLatestSuspenseTimeout

Remove workInProgressRootLatestSuspenseTimeout field from the work loop in preparation for splitting timeout from expiration time.

+15 -13

0 comment

1 changed file

pr created time in 3 months

create barnchlunaruan/react

branch : timeoutMs_expirationTime

created branch time in 3 months

push eventlunaruan/react

Sebastian Markbåge

commit sha 39dbb14da321cabafe3ab67de41150672aa301fc

[Flight] Move Flight DOM to a Webpack Specific Package (#17372) * Move Flight DOM to Webpack Specific Packagee We'll have Webpack specific coupling so we need to ensure that it can be versioned separately from various Webpack versions. We'll also have builds for other bundlers in the future. * Move to peerDep * Move DOM Flight Tests * Merge ReactFlightIntegration into ReactFlightDOM This was an integration test. We can add to it. * Fix fixture paths

view details

Sebastian Markbåge

commit sha 8e74a31b2d0017061e265ae1a3fbfbacb7af5614

Add Webpack as devDependency (#17379) This is now used by the Flight package so it needs to be installed as a peer.

view details

Andrew Clark

commit sha 2586303662736d72e79046b51c8df993b21e6093

[Bugfix] Pending state is always user-blocking (#17382) Fixes a bug where `isPending` is only set to `true` if `startTransition` is called from inside an input event. That's usually the case, but not always. Now it works regardless of where you call it.

view details

David Garner

commit sha a807c307c496d96e8ff79f53cf2d6203c45cf0c6

[eslint] Check forwardRef callbacks (#17255) * [eslint] Check forwardRef callbacks (#17220) * [eslint] Make tests more realistic (#17220) * [eslint] Check anonymous callback of React.memo for rules-of-hooks (#17220) * [eslint] Add tests for callbacks not known to be components (#17220) * [eslint] Correct comments and add another test (#17220)

view details

Andrew Clark

commit sha 1f2da0babd723f1b479f84cef5a0ea4fedac3959

Forgot to mark test as experimental (#17391)

view details

Sebastian Markbåge

commit sha 3ad076472ce9108b9b8a6a6fe039244b74a34392

Update Fixtures to use new APIs (#17380) Also renamed unstable-async to concurrent

view details

Dominic Gannaway

commit sha a7d07ff24d8d3d925ab45f5eb9be42a62a345dad

[react-interactions] Rename Flare listeners prop to DEPRECATED_flareListeners (#17394)

view details

Dominic Gannaway

commit sha 3fdfa231ad4bbe81516866dc9cd7ed5d18acf223

[react-interactions] Refine virtual click detection for FF+JAWS/NVDA (#17422)

view details

Dominic Gannaway

commit sha 007a276b6541f98318adf5d37668fceb5ef37223

[react-interactions] Fix memory leak in event responder system (#17421)

view details

Dan Abramov

commit sha 237a966da058fa063abd2e1365e90f2a26aa4e51

[Fresh] Fix an infinite loop in an edge case (#17414) * [Fresh] Fix an infinite loop in an edge case * Make it work in IE11

view details

Andrew Clark

commit sha 54f66731c84e3f141a1c0bc5d32be7cc5d4b9bbf

Update release script URL (#17428) CircleCI API endpoint changed

view details

Dan Abramov

commit sha 6470e0f169b4cf0416132aa66221bf20e264c618

[Fresh] Make all errors recoverable (#17438) * [Fresh] Detect root updates more reliably * [Fresh] Use WeakMap for root elements * [Fresh] Make initial failures recoverable too * Fix DevTools check * Fix wrong flow type

view details

Luna Ruan

commit sha d4a7f6c1896c209d078cbc7e2f546f10c943faf7

Merge branch 'master' of https://github.com/facebook/react into suspense_boundary

view details

Luna Ruan

commit sha b98a8d73e6f5a19d36e11abd940284a7c99ac981

fixed tests and refactored hideAndUnhideAllChildren

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 15a70e91b8d17261b85112430a7314a0210aa7a7

fixed tests

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 9a5f28dbedc2b2edd01d216e347ab24b8efa73fc

update version numbers for 16.12

view details

Luna Ruan

commit sha 1832f832c51dc58b57cb012767fae5814f31b016

Changelog for 16.12

view details

Dominic Gannaway

commit sha f30ccb9ed9248cb59cdd68dde66e3971afaaa594

[react-interactions] Fix unatached fiber bug (#17371)

view details

Dominic Gannaway

commit sha 532810a370cdb89eb12749f6e1cd59dd73acbeb4

[react-interactions] FocusWithin beforeblur propagation fix (#17375)

view details

Luna Ruan

commit sha a29d636933df61c04b9bef5ebfaa4d8213864094

Merge branch 'master' of https://github.com/facebook/react into suspense_boundary

view details

Luna Ruan

commit sha 874cd0f9b4108424bcdda2c97ceeb75ef9eae7d5

addressed comments and added feature flag

view details

push time in 3 months

delete branch lunaruan/react

delete branch : changelog

delete time in 3 months

PR closed facebook/react

Changelog for 16.12 CLA Signed

16.12.0 (November 14, 2019)

React DOM

  • Fix passive effects (useEffect) not being fired in a multi-root app. @acdlite in #17347

React IS

  • Fix lazy and memo types considered elements instead of components @bvaughn in #17278
+10 -0

3 comments

1 changed file

lunaruan

pr closed time in 3 months

PR opened reactjs/reactjs.org

Reviewers
Update for 16.12
+18 -16

0 comment

4 changed files

pr created time in 3 months

push eventlunaruan/reactjs.org

Ravi Prakash

commit sha 41757f144daef5feb22687f33ec0b9ab250d0259

Added a new resource (#2419)

view details

Thalyta Fabrine

commit sha 81124465ac68335b2e3fdf21952a51265de6877f

Fix broken link for suspense demo (#2418)

view details

Robert Haritonov

commit sha 4853622a359d1abafb82f37635dd6deb3d5f8287

Add React Summit Amsterdam 2020, and update conf domain (#2423)

view details

Tom Beckenhauer

commit sha 378afa448af80a675fc6c8d764c07d34a26b28b0

Update meetups.md (#2439)

view details

Adebayo Ilerioluwa

commit sha d303b08c19bc7a01055c0cf30055329ab1645644

Update conferences.md (#2445) Added reactsummit from nigeria

view details

mvikrammenon

commit sha c26e34d68927e18a46447eb0f56b678c6d2958f9

Updated URL with page section (#2446)

view details

Eugene Stepnov

commit sha 1e44de0ef05fac41d60f0716323a1e95a9703af4

Update tool-ui-component.md (#2447) Add a link to Flatlogic React admin templates.

view details

Alexey Pyltsyn

commit sha b18fc408802b0896e090bb464c711b96b1223422

Specify lang option for gatsby-plugin-manifest

view details

Arshita Kakkar

commit sha d2ade76cce133af47ab198188fa2de03fa51834b

Documentation (#2449) * Update getting-started.md Line 41 - When starting a React project, [a simple HTML page with script tags](/docs/add-react-to-a-website.html) might still be the best option. It only takes a minute to set up! Removed the hyperlink from "a" as we're focusing on simple HTML page so a shouldn't be hyperlinked. * Update getting-started.md Closes #2450 Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>

view details

Sophie Alpert

commit sha 71050d527d97494e876a7efe7d6f001e1f288d23

Update code-splitting.md

view details

Andrew Clark

commit sha e560f8ae220b5f5729f1fd07d232089556cab837

Blog post announcing prerelease channels (#2455)

view details

Andrew Clark

commit sha be0cd9ff799e275565f97dd6679aac2391bb7e76

Typo

view details

Andrew Clark

commit sha b4b53b3d4c62d70bac179ef4ab92fb86c8cf280d

Fix double negative more unstable -> less stable

view details

Andrew Clark

commit sha 2a15e912ec1c15506344b3e10553ceab6968208e

Fix double negative on Release Channels page, too

view details

Tomasz Czajęcki

commit sha 6de2fdf80b5c66e7b37c7d8338a2c2fa7681865f

Add app.js Conf to conferences (#2458) * Add app.js conf * Change spelling of Kraków

view details

Dan Abramov

commit sha 9932845b39751462a8035fff29728627ea2689b5

Concurrent Mode Documentation (#2461)

view details

Juan

commit sha f324360d58af3a9b63949057a5757443e6078786

Update links to Relay docs (#2462)

view details

swyx

commit sha 62775f329eb284c4f87d3707ad11da3b2fe268cf

fix tiny typo on concurrent docs (#2465)

view details

Josh Pollock

commit sha ba4b45cfd070bf09dc8d1d812d1551a39f9f7946

Minor typo fix in concurrent mode overview. (#2464)

view details

Stephen Hanson

commit sha c7c9306d29d15709fa62d5920ade5efba13ae6a3

Fix typo in suspense documentation (#2467) Removes a redundant "about this" in the concurrent-mode suspense docs.

view details

push time in 3 months

release facebook/react

v16.12.0

released time in 3 months

push eventfacebook/react

Luna Ruan

commit sha 9a5f28dbedc2b2edd01d216e347ab24b8efa73fc

update version numbers for 16.12

view details

Luna Ruan

commit sha 1832f832c51dc58b57cb012767fae5814f31b016

Changelog for 16.12

view details

push time in 3 months

created tagfacebook/react

tagv16.12.0

A declarative, efficient, and flexible JavaScript library for building user interfaces.

created time in 3 months

push eventlunaruan/react

Nicolas Gallagher

commit sha c5e7190ed4af266bbc636bda08e766fce9ee68a7

[react-interactions] Press with useRef instead of useState (#16870) We only need to read and modify the value for the lifetime of the hook

view details

Andrew Clark

commit sha 8b580a89d6dbbde8a3ed69475899addef1751116

Idle updates should not be blocked by hidden work (#16871) * Idle updates should not be blocked by hidden work Use the special `Idle` expiration time for updates that are triggered at Scheduler's `IdlePriority`, instead of `Never`. The key difference between Idle and Never¹ is that Never work can be committed in an inconsistent state without tearing the UI. The main example is offscreen content, like a hidden subtree. ¹ "Never" isn't the best name. I originally called it that because it "never" expires, but neither does Idle. Since it's mostly used for offscreen subtrees, we could call it "Offscreen." However, it's also used for dehydrated Suspense boundaries, which are inconsistent in the sense that they haven't finished yet, but aren't visibly inconsistent because the server rendered HTML matches what the hydrated tree would look like. * Reset as early as possible using local variable * Updates in a hidden effect should be Idle I had made them Never to avoid an extra render when a hidden effect updates the hidden component -- if they are Idle, we have to render once at Idle, which bails out on the hidden subtree, then again at Never to actually process the update -- but the problem of needing an extra render pass to bail out hidden updates already exists and we should fix that properly instead of adding yet another special case.

view details

Jessica Franco

commit sha 18d2e0c03e4496a824fdb7f89ea2a3d60c30d49a

Warning system refactoring (part 1) (#16799) * Rename lowPriorityWarning to lowPriorityWarningWithoutStack This maintains parity with the other warning-like functions. * Duplicate the toWarnDev tests to test toLowPriorityWarnDev * Make a lowPriorityWarning version of warning.js * Extract both variants in print-warning Avoids parsing lowPriorityWarning.js itself as the way it forwards the call to lowPriorityWarningWithoutStack is not analyzable.

view details

Dominic Gannaway

commit sha 68a87eee544b2bcdff66c751e07cb55939b9d8ca

[react-interactions] Add FocusList component (#16875)

view details

Dominic Gannaway

commit sha 793f176dad4544363149098cc56eb2abff687fe2

[react-interactions] Make FocusList bundle (#16876)

view details

Dominic Gannaway

commit sha ebc299fc2f21a74fffa3f8aa2209259d98702156

[react-interactions] TabFocus -> FocusManager (#16874)

view details

Joshua Gross

commit sha 32e5c97d11e390e6a3d3ce6a2ab7443daed09747

[React Native] Improve errors for invalid ViewConfig getter functions (#16879) * [React Native] Improve logging for missing view configs and invalid view config getter functions * [React Native] Improve logging for missing view configs and invalid view config getter functions

view details

Dominic Gannaway

commit sha d0ebde77f6d1232cefc0da184d731943d78e86f2

[react-interactions] Add initial docs explaining React Scopes (#16892)

view details

Dominic Gannaway

commit sha d6d83d7060388c6b1b3bc0a28708995de6240ce3

[react-interactions] Add Portal propagation configuration (#16889)

view details

Sebastian Markbåge

commit sha 0d8c0cd0968150e187ed7132315521d78a5abf61

These flags are hard coded in our internal config (#16883) By hard coding them here they can get properly DCE and don't have to be sent to users. The internal config should only have dynamic flags.

view details

Sebastian Markbåge

commit sha a06d181af081a17bea466eef2bae1bdaaf8a4b5e

Include tag in begin/complete invariant (#16881)

view details

Dominic Gannaway

commit sha 7c3bd08b3767ed69ddf398176de58214561194a0

[react-interactions] Add more documentation for a11y components (#16894)

view details

Dominic Gannaway

commit sha 57bf275fbd89afc9afb84cefb950eb74c3573ea7

[devtools] Add support for React Scope symbol/number (#16893)

view details

Brian Vaughn

commit sha fa1a3262271be165820fa51daeb036ba260205a3

Update useEditableValue hook to sync external value changes (#16878) * Update useEditableValue to mirror value cahnges Previously, the hook initialized local state (in useState) to mirror the prop/state value. Updates to the value were ignored though. (Once the state was initialized, it was never updated.) The new hook updates the local/editable state to mirror the external value unless there are already pending, local edits being made. * Optimistic CHANGELOG update * Added additional useEditableValue() unit test cases

view details

Dominic Gannaway

commit sha 4bb0e96b4b0dd5db4bb349cd27425e5594970eb3

[react-interactions] FocusTable key press bound propgataion (#16895)

view details

Sebastian Markbåge

commit sha 3694a3b5e9a5a3c80d47f9889a17d8337573d513

Selective Hydration (#16880) * Add Feature Flag for Selective Hydration * Enable Synchronous Hydration of Discrete Events * Resolve cyclic dependency

view details

David Huang

commit sha 49b0cb6db8e4a32b6523d5e538578d9d9c6db592

Moving backend injection to the content script (#16900)

view details

Dominic Gannaway

commit sha b9811ed5bc710f6318eed6292ad76e4874ac7f99

[react-interactions] Add wrapping support to FocusList/FocusTable (#16903)

view details

Brian Vaughn

commit sha 84e83db1ee6303bc31120af59e20750a0fa299bc

Updated DevTools CHANGELOG

view details

Brian Vaughn

commit sha b6606ecba80b591ea66db1e2ee1fed72befb4c32

DevTools shows unsupported renderer version dialog (#16897) * DevTools shows unsupported renderer version dialog * Optimistic CHANGELOG udpate

view details

push time in 3 months

created taglunaruan/react

tagv16.9.0

A declarative, efficient, and flexible JavaScript library for building user interfaces.

created time in 3 months

created taglunaruan/react

tagv16.12.0

A declarative, efficient, and flexible JavaScript library for building user interfaces.

created time in 3 months

created taglunaruan/react

tagv16.9.0-rc.0

A declarative, efficient, and flexible JavaScript library for building user interfaces.

created time in 3 months

PR opened facebook/react

Changelog for 16.12

16.12.0 (November 14, 2019)

React DOM

  • Fix passive effects (useEffect) not being fired in a multi-root app. @acdlite in #17347

React IS

  • Fix lazy and memo types considered elements instead of components @bvaughn in #17278
+10 -0

0 comment

1 changed file

pr created time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha fa8739ccf8c2e174fbe8774a653b3e253881ec93

commit changelog

view details

push time in 3 months

create barnchlunaruan/react

branch : changelog

created branch time in 3 months

PR opened facebook/react

Reviewers
Added unstable_do_not_use_getDOMNodes

Added ability to get child DOM nodes from suspense boundaries after the children of a suspense boundary unsuspends or during mount if children do not suspend

+215 -0

0 comment

2 changed files

pr created time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 1130956cdbfb33f68efca6f4cdede8d84923e633

added unstable_do_not_use_getDOMNodes

view details

Luna Ruan

commit sha edda5061f5412da5c40c4693b529749ef676d7f8

Merge branch 'suspense_boundary' of https://github.com/lunaruan/react into suspense_boundary

view details

push time in 3 months

create barnchlunaruan/react

branch : suspense_boundary

created branch time in 3 months

push eventlunaruan/react

Dan Abramov

commit sha 182f64f938d456b011e0139c07f35275e5d89c53

[Flight] End-to-End Fixture (#17319)

view details

Dan Abramov

commit sha be3bfa6fabccd2e76d3bb3841a67f6d8ede7892c

[Flight] Basic Integration Test (#17307) * [Flight] Basic Integration Test * Just act() * Lint * Remove unnecessary acts * Use Concurrent Mode * it.experimental * Fix prod test by advancing time * Don't observe initial state

view details

Dan Abramov

commit sha a7b4d51a20a00f0f60b113c3a02326ccf69aef82

Warn when doing createRoot twice on the same node (another approach) (#17329) * Unify fields used for createRoot warning and event system * Warn when doing createRoot twice on the same node * Stricter check for modern roots * Unmark asynchronously * Fix Flow

view details

Dan Abramov

commit sha b8f8258775211d2d3b1b144cc6c75148ecd4b8d8

Split ReactDOM entry point (#17331) * Split ReactDOM entry point * BatchedRoot -> BlockingRoot

view details

Dominic Gannaway

commit sha 6cff70a740d1e6ad10070ebf88514bd3a49d0f0d

[react-interactions] Expost host instance to Scope Query function (#17341)

view details

Eli White

commit sha 01bce8c24843b02a0082edb55d3cd4763e7a956d

Change legacy-events plugin nativeEventTarget to allow null (#17344)

view details

Eli White

commit sha 2c6ea0b3ffffd1a110845327262ecea59ee48dab

[Native] Add FeatureFlag to dispatch events with instance targets (#17323) * [Native] Add FeatureFlag to dispatch events with instance targets * Prettier

view details

Eli White

commit sha 3dcec3a9258e644f5409405ed22103fa1a90b10d

[Native] Add FeatureFlag to dispatch events with instance currentTarget (#17345) * [Native] Add FeatureFlag to dispatch events with instance targets * Prettier * [Native] Change currentTarget to be an instance behind a flag 2/2

view details

Eli White

commit sha ade764157ff7ff27ab11ed8b61791a7edef8e683

[Native] If statement cleanup for null targets (#17346)

view details

Vasilii Cuhar

commit sha f4cc45ce962adc9f307690e1d5cfa28a288418eb

[Fresh] Add options to configure RefreshSig and RefreshReg identifiers (#17340)

view details

Andrew Clark

commit sha b53ea6ca05d2ccb9950b40b33f74dfee0421d872

[Bugfix] Passive effects triggered by synchronous renders in a multi-root app (#17347) * Regression test: Effects dropped across roots See #17066 * [Bugfix] Passive effects loop The bug ------- In a multi-root app, certain passive effects (`useEffect`) are never fired. See #17066. The underlying problem ---------------------- The implicit contract of `flushPassiveEffects` is that, right after calling it, there should be no pending passive effects. In the normal case, in concurrent mode, this is true. But the current implementation fails to account for the case where a passive effect schedules synchronous work, which in turn schedules additional passive effects. This led to `rootWithPendingPassiveEffects` being overwritten in the commit phase, because an assignment that assumed it was replacing null was actually replacing a reference to another root, which has the consequence of dropping passive effects on that root. The fix ------- The fix I've chosen here is, at the beginning of the commit phase, keep flushing passive effects in a loop until there are no more. This doesn't not change the "public" implementation of `flushPassiveEffects`, though it arguably should work this way, too. I say "public" because it's only used by implementation layers on top of React which we control: mainly, the legacy version of `act` that does not use the mock Scheduler build. So there's probably still a bug in that `act` implementation. I will address `act` in a follow-up. The ideal solution is to replace the legacy `act` with one implemented directly in the renderer, using a special testing-only build of React DOM. Since that requires a breaking change, we'll need an interim solution. We could make the "public" `act` recursively flush effects in a loop, as I've done for the commit phase. However, I think a better solution is to stop automatically flushing the synchronous update queue at the end of `flushPassiveEffects`, and instead require the caller to explicitly call `flushSyncUpdateQueue` (or the equivalent) if needed. This follows the same pattern we use internally in the work loop, which is designed to avoid factoring hazards like the one that resulted in this bug.

view details

Dominic Gannaway

commit sha a61886b16b5183d63b85dbd92e5808f82be93208

[react-interactions] Refine custom active element blur logic (#17354)

view details

Luna Ruan

commit sha c58cc1977ecd2169cbd0d2ee715d1182b11429a5

Merge branch 'master' into use_id

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 4baf39e2adb8832498893fde884f58774a31d6a3

fixed another test

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 38524e63f2b445601b7c147d2b6cae3bee73170f

fixed lint errors + test failurs

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 264a0218061ab13841c848c42283d567d50f0fa5

fixed flow and moved tests aroound

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 83fb7e80fd5565cb04bd2ba582dac2401495911b

update tests

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 92d215166fa979626cb72cfd862da1464a5bf86b

fixed tests

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 23d38e7745172fae6c8e695b2dd1fc7f01a9bc28

split up itRenders to separate tests

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 4baef711f5f5e4ebc41c56e73ab15695e5313df3

added two new tests

view details

push time in 3 months

Pull request review commentfacebook/react

Add useUniqueId Hook

 export function setAttribute(   attributeName: string,   attributeValue: string | TrustedValue, ) {-  node.setAttribute(attributeName, (attributeValue: any));+  if (attributeValue.$$typeof === REACT_OPAQUE_OBJECT_TYPE) {

I think node.setAttribute is called during setInitialDOMProperties as well to set attributes:

setInitialDOMProperties -> setValueForProperty -> setAttribute/setAttributeNs

lunaruan

comment created time in 3 months

Pull request review commentfacebook/react

Add useUniqueId Hook

 export function getValueForAttribute(       return expected === undefined ? undefined : null;     }     const value = node.getAttribute(name);-    if (value === '' + (expected: any)) {+    if (value === toString(expected)) {

if expected is the opaque object, this would throw the string error. toString doesn't convert the opaque object, which makes this just return value, which is what it should be anyway.

lunaruan

comment created time in 3 months

PR opened facebook/react

Add useUniqueId Hook

We currently use unique IDs in a lot of places. Examples are: * <label for="ID"> * aria-labelledby

This can cause some issues: 1. If we server side render and then hydrate, this could cause an hydration ID mismatch 2. If we server side render one part of the page and client side render another part of the page, the ID for one part could be different than the ID for another part even though they are supposed to be the same 3. If we conditionally render something with an ID , this might also cause an ID mismatch because the ID will be different on other parts of the page

This PR creates a new hook useUniqueId that generates a different unique ID based on whether the hook was called on the server or client. If the hook is called during hydration, it generates an opaque object that will rerender the hook so that the IDs match.

+245 -6

0 comment

13 changed files

pr created time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 83efdddaa16c0c0aa55e0d075df49716f4d94553

fixed name here

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha 7908b7b6a7f0fc068c033f39a66e848966ff9d41

fixed reactDebugHooks

view details

push time in 3 months

push eventlunaruan/react

Luna Ruan

commit sha a71105a47c528991cfe8e228f6e0b53ec0ceaa65

renamed useUniqueId to useUniqueID

view details

push time in 3 months

create barnchlunaruan/react

branch : use_id

created branch time in 3 months

fork lunaruan/flow

Adds static typing to JavaScript to improve developer productivity and code quality.

https://flow.org/

fork in 4 months

PR merged facebook/react

Migrate useDeferredValue and useTransition CLA Signed

Migrated useDeferredValue and useTransition from Facebook's www repo into ReactFiberHooks.

+544 -19

9 comments

9 changed files

lunaruan

pr closed time in 4 months

push eventfacebook/react

Luna Ruan

commit sha 685ed561f22ea062281a4c570c7067e6020457c4

Migrate useDeferredValue and useTransition (#17058) Migrated useDeferredValue and useTransition from Facebook's www repo into ReactFiberHooks.

view details

push time in 4 months

push eventlunaruan/react

Luna Ruan

commit sha 666e922b592986c625a61e0dc384c252705951f7

removed warnings

view details

push time in 4 months

push eventlunaruan/react

Luna Ruan

commit sha c0ddda1ced3330e33297181bf269595d9e5729a9

fixed ReactHooks test

view details

push time in 4 months

push eventlunaruan/react

Dominic Gannaway

commit sha 26ba38ae4b65375b97b561ec2d6a58ef597647ed

[EnterLeaveEventPlugin] Fix bug when dealing with unhandled DOM nodes (#17006)

view details

Sebastian Markbåge

commit sha 3a2b5f148d450c69aab67f055fc441d294c23518

[Selective Hydration] ReactDOM.unstable_scheduleHydration(domNode) (#17004) Adds an API to explicitly prioritize hydrating the path to a particular DOM node without relying on events to do it. The API uses the current scheduler priority to schedule it. For the same priority, the last one wins. This allows a similar effect as continuous events. This is useful for example to hydrate based on scroll position, or prioritize components that will upgrade to client-rendered-only content. I considered having an API that explicitly overrides the current target(s). However that makes it difficult to coordinate across components in an app. This just hydrates one target at a time but if it is blocked on I/O we could consider increasing priority of later targets too.

view details

Luna Ruan

commit sha 4bc52ef0dfbb0389cc20b65cef0645afb7b85445

Revert "update hideOrUnhideAllChildren to hide portals that aren't wrapped in a host component (#16992)" (#17011) This reverts commit de2edc268db827f5110fc56cba240b7eb7301787.

view details

Dominic Gannaway

commit sha fff5b1ca773c36d0aa221689d31fee79b0498495

[react-interactions] Add FocusTable colSpan support (#17019)

view details

Dominic Gannaway

commit sha a011aacafa7623bf14654713b130542b4bd2aedb

[react-interactions] Remove FB builds of a11y components (#17030)

view details

Dominic Gannaway

commit sha 55731fd8ce7d36a482a50a120cd4da0584ce49de

[react-interactions] Refine a11y component flow types (#17032)

view details

Andrew Clark

commit sha cd1b167ad40c5c62cf2a0b32451fe2aebb669d08

[Scheduler Profiler] Use microsecond precision (#17010) The `performance.now` returns a timestamp in milliseconds as a float. The browser has the option to adjust the precision of the float, but it's usually more precise than a millisecond. However, this precision is lost when the timestamp is logged by the Scheduler profiler, because we store the numbers in an Int32Array. This change multiplies the millisecond float value by 1000, giving us three more degrees of precision.

view details

Andrew Clark

commit sha 71d012ecd07baef6f53d02bebd720794f75266ca

Remove dormant createBatch experiment (#17035) * Remove dormant createBatch experiment In a hybrid React app with multiple roots, `createBatch` is used to coordinate an update to a root with its imperative container. We've pivoted away from multi-root, hybrid React apps for now to focus on single root apps. This PR removes the API from the codebase. It's possible we'll add back some version of this feature in the future. * Remove unused export

view details

Andrew Clark

commit sha 5a71cbe7a9e192c23b847be6e0c575b6705f6939

Remove unused export Meant to do this in e4b21be but neglected to `git add` the changes.

view details

Dominic Gannaway

commit sha b71ab61c8f06b7d1c415a0354db607bf2772473e

[react-interactions] Adds more experimental Scope API methods (#17042)

view details

Eli White

commit sha 4be45be5ff4b26892bab83b5f9022afac1a664fb

Stop warning about setNativeProps being deprecated (#17045) * Stop warning about setNativeProps being deprecated * Remove ReactNative.setNativeProps * Remove more Fabric tests

view details

Brian Vaughn

commit sha 22b2642a565cf9160bbf660ab030d07d8273879e

DevTools test shell tweaks (#17054) * Updated DevTools shell ignore warning message to account for recent changes in warning text * Update DevTools console patching to patch the parent window's console rather than the iframe, to more accurately simulate real usage environment

view details

Dominic Gannaway

commit sha 0ac8e563d0bdbbbfe12d718710b3959e78d507dd

[react-interactions] Add getInstanceFromNode support to TestHostRenderer (#17065) Fix bad WeakMap key case Fix bad WeakMap key case

view details

Andrew Clark

commit sha 75955bf1d7ff6c2c1f4052f4a84dd2ce6944c62e

Pass prod error messages directly to constructor (#17063) * Remove "Invariant Violation" from dev errors When I made the change to compile `invariant` to throw expressions, I left a small runtime to set the error's `name` property to "Invariant Violation" to maintain the existing behavior. I think we can remove it. The argument for keeping it is to preserve continuity in error logs, but this only affects development errors, anyway: production error messages are replaced with error codes. * Pass prod error messages directly to constructor Updates the `invariant` transform to pass an error message string directly to the Error constructor, instead of mutating the message property. Turns this code: ```js invariant(condition, 'A %s message that contains %s', adj, noun); ``` into this: ```js if (!condition) { throw Error( __DEV__ ? `A ${adj} message that contains ${noun}` : formatProdErrorMessage(ERR_CODE, adj, noun) ); } ```

view details

Sebastian Markbåge

commit sha d5b54d0c35fa7c1b1e5989239478b365493965df

[SuspenseList] Fix bugs with dropped Promises (#17082) * Transfer any pending promises from inner boundary to list For non-hidden modes, this boundary should commit so this shouldn't be needed but the nested boundary can make a second pass which forces these to be recreated without resuspending. In this case, the outer list assumes that it can collect the inner promises to still rerender if needed. * Propagate suspense "context" change to nested SuspenseLists This means that we always rerender any nested SuspenseLists together. This bug looks similar to the previous one but is not based on the lack of retry but that the retry only happens on the outer boundary but the inner doesn't get a retry ping since it didn't know about its own promise after the second pass.

view details

Andrew Clark

commit sha d364d8555f0c2c44e8fb624068b9fff30d5908ae

Set up experimental builds (#17071) * Don't bother including `unstable_` in error The method names don't get stripped out of the production bundles because they are passed as arguments to the error decoder. Let's just always use the unprefixed APIs in the messages. * Set up experimental builds The experimental builds are packaged exactly like builds in the stable release channel: same file structure, entry points, and npm package names. The goal is to match what will eventually be released in stable as closely as possible, but with additional features turned on. Versioning and Releasing ------------------------ The experimental builds will be published to the same registry and package names as the stable ones. However, they will be versioned using a separate scheme. Instead of semver versions, experimental releases will receive arbitrary version strings based on their content hashes. The motivation is to thwart attempts to use a version range to match against future experimental releases. The only way to install or depend on an experimental release is to refer to the specific version number. Building -------- I did not use the existing feature flag infra to configure the experimental builds. The reason is because feature flags are designed to configure a single package. They're not designed to generate multiple forks of the same package; for each set of feature flags, you must create a separate package configuration. Instead, I've added a new build dimension called the **release channel**. By default, builds use the **stable** channel. There's also an **experimental** release channel. We have the option to add more in the future. There are now two dimensions per artifact: build type (production, development, or profiling), and release channel (stable or experimental). These are separate dimensions because they are combinatorial: there are stable and experimental production builds, stable and experimental developmenet builds, and so on. You can add something to an experimental build by gating on `__EXPERIMENTAL__`, similar to how we use `__DEV__`. Anything inside these branches will be excluded from the stable builds. This gives us a low effort way to add experimental behavior in any package without setting up feature flags or configuring a new package.

view details

Andrew Clark

commit sha a8c6a1b34e93f88f285a1a042bf473f39a30c886

Update release scripts to support experimental releases (#17086) * Download correct artifacts for release channel Experimental builds should pull artifacts from the `process_artifacts_experimental` job. I think instead of two separate CI workflows, a better approach might be to build stable artifacts to the `build` directory and the experimental artifacts to a `build_experimental` directory, and generate both within the same workflow. This would take some work since lots of things assume the output directory is `build`, but something to consider in the future. * Prevent experimental promotion to stable Adds a check to the `prepare-stable` script to prevent experimental builds from being published using stable semver versions.

view details

Krzysztof Kotowicz

commit sha fdba0e5ce75f1cf1f82f2937f351bbfdcaadbcc5

Fixed a bug with illegal invocation for Trusted Types (#17083) * Fixed a bug with illegal invocation. * Fixed the test.

view details

Dominic Gannaway

commit sha e7704e22a146c2d5b00f8c6bfa6255153272f053

[babel-plugin-react-jsx] Avoid duplicate "children" key in props object (#17094) * [babel-plugin-react-jsx] Avoid duplicate "children" key in props object * Use Object.assign approach

view details

Dominic Gannaway

commit sha 4cb399a433771c84e861d5ca3d38a24733d23ad8

[react-interactions] Modify Scope query mechanism (#17095)

view details

push time in 4 months

delete branch lunaruan/recast

delete branch : destructuring-default-function-params

delete time in 4 months

push eventfacebook/react

Sebastian Markbåge

commit sha ed5f010ae51db1544ce92e1a5105e870b5a5098e

Client render Suspense content if there's no boundary match (#16945) Without the enableSuspenseServerRenderer flag there will never be a boundary match. Also when it is enabled, there might not be a boundary match if something was conditionally rendered by mistake. With this PR it will now client render the content of a Suspense boundary in that case and issue a DEV only hydration warning. This is the only sound semantics for this case. Unfortunately, landing this will once again break #16938. It will be less bad though because at least it'll just work by client rendering the content instead of hydrating and issue a DEV only warning. However, we must land this before enabling the enableSuspenseServerRenderer flag since it does this anyway. I did notice that we special case fallback={undefined} due to our unfortunate semantics for that. So technically a workaround that works is actually setting the fallback to undefined on the server and during hydration. Then flip it on only after hydration. That could be a workaround if you want to be able to have a Suspense boundary work only after hydration for some reason. It's kind of unfortunate but at least those semantics are internally consistent. So I added a test for that.

view details

push time in 4 months

PR merged facebook/react

Reviewers
Client render Suspense content if there's no boundary match CLA Signed

Without the enableSuspenseServerRenderer flag there will never be a boundary match. Also when it is enabled, there might not be a boundary match if something was conditionally rendered by mistake.

With this PR it will now client render the content of a Suspense boundary in that case and issue a DEV only hydration warning. This is the only sound semantics for this case.

Unfortunately, landing this will once again break #16938. It will be less bad though because at least it'll just work by client rendering the content instead of hydrating and issue a DEV only warning.

However, we must land this before enabling the enableSuspenseServerRenderer flag since it does this anyway.

I did notice that we special case fallback={undefined} due to our unfortunate semantics for that. So technically a workaround that works is actually setting the fallback to undefined on the server and during hydration. Then flip it on only after hydration. That could be a workaround if you want to be able to have a Suspense boundary work only after hydration for some reason.

It's kind of unfortunate but at least those semantics are internally consistent. So I added a test for that.

cc @Timer @timneutkens

+47 -16

5 comments

4 changed files

sebmarkbage

pr closed time in 4 months

Pull request review commentfacebook/react

Migrate useDeferredValue and useTransition

 function updateMemo<T>(   return nextValue; } +function mountDeferredValue<T>(+  value: T,+  config: TimeoutConfig | void | null,+): T {+  const [prevValue, setValue] = mountState(value);+  mountEffect(+    () => {+      Scheduler.unstable_next(() => {+        const previousConfig = ReactCurrentBatchConfig.suspense;+        ReactCurrentBatchConfig.suspense = config === undefined ? null : config;+        try {+          setValue(value);+        } finally {+          ReactCurrentBatchConfig.suspense = previousConfig;+        }+      });

Yeah, it was accidental copy/paste. Deleted it! :)

lunaruan

comment created time in 4 months

push eventfacebook/react

Luna Ruan

commit sha 3ac0eb075d82b19a912c6665eb4f6adb9245cbcb

Modify Babel React JSX Duplicate Children Fix (#17101) If a JSX element has both a children prop and children (ie. <div children={childOne}>{childTwo}</div>), IE throws an Multiple definitions of a property not allowed in strict mode. This modifies the previous fix (which used an Object.assign) by making the duplicate children a sequence expression on the next prop/child instead so that ordering is preserved. For example: ``` <Component children={useA()} foo={useB()} children={useC()}>{useD()}</Component> ``` should compile to ``` React.jsx(Component, {foo: (useA(), useB()), children: (useC(), useD)}) ```

view details

push time in 4 months

more