Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to React@17 #358

Closed
nelsonni opened this issue Mar 4, 2021 · 2 comments · Fixed by #359
Closed

Upgrading to React@17 #358

nelsonni opened this issue Mar 4, 2021 · 2 comments · Fixed by #359
Assignees
Labels
bug Bug reports or bug fixes dependencies Issues or updates to dependency files feature Feature requests or improvements

Comments

@nelsonni
Copy link
Member

nelsonni commented Mar 4, 2021

Describe the bug
React v17.0 has been released with changelog:

React

  • Add react/jsx-runtime and react/jsx-dev-runtime for the new JSX transform.
  • Build component stacks from native error frames.
  • Allow to specify displayName on context for improved stacks.
  • Prevent 'use strict' from leaking in the UMD bundles.
  • Stop using fb.me for redirects.

React DOM

  • Delegate events to roots instead of document.
  • Clean up all effects before running any next effects.
  • Run useEffect cleanup functions asynchronously.
  • Use browser focusin and focusout for onFocus and onBlur.
  • Make all Capture events use the browser capture phase.
  • Don’t emulate bubbling of the onScroll event.
  • Throw if forwardRef or memo component returns undefined.
  • Remove event pooling.
  • Stop exposing internals that won’t be needed by React Native Web.
  • Attach all known event listeners when the root mounts.
  • Disable console in the second render pass of DEV mode double render.
  • Deprecate the undocumented and misleading ReactTestUtils.SimulateNative API.
  • Rename private field names used in the internals.
  • Don’t call User Timing API in development.
  • Disable console during the repeated render in Strict Mode.
  • In Strict Mode, double-render components without Hooks too.
  • Allow calling ReactDOM.flushSync during lifecycle methods (but warn).
  • Add the code property to the keyboard event objects.
  • Add the disableRemotePlayback property for video elements.
  • Add the enterKeyHint property for input elements.
  • Warn when no value is provided to <Context.Provider>.
  • Warn when memo or forwardRef components return undefined.
  • Improve the error message for invalid updates.
  • Exclude forwardRef and memo from stack frames.
  • Improve the error message when switching between controlled and uncontrolled inputs.
  • Keep onTouchStart, onTouchMove, and onWheel passive.
  • Fix setState hanging in development inside a closed iframe.
  • Fix rendering bailout for lazy components with defaultProps.
  • Fix a false positive warning when dangerouslySetInnerHTML is undefined.
  • Fix Test Utils with non-standard require implementation.
  • Fix onBeforeInput reporting an incorrect event.type.
  • Fix event.relatedTarget reported as undefined in Firefox.
  • Fix “unspecified error” in IE11.
  • Fix rendering into a shadow root.
  • Fix movementX/Y polyfill with capture events.
  • Use delegation for onSubmit and onReset events.
  • Improve memory usage.

React DOM Server

  • Make useCallback behavior consistent with useMemo for the server renderer.
  • Fix state leaking when a function component throws.

React Test Renderer

  • Improve findByType error message.

Concurrent Mode (Experimental)

  • Revamp the priority batching heuristics.
  • Add the unstable_ prefix before the experimental APIs.
  • Remove unstable_discreteUpdates and unstable_flushDiscreteUpdates.
  • Remove the timeoutMs argument.
  • Disable <div hidden /> prerendering in favor of a different future API.
  • Add unstable_expectedLoadTime to Suspense for CPU-bound trees.
  • Add an experimental unstable_useOpaqueIdentifier Hook.
  • Add an experimental unstable_startTransition API.
  • Using act in the test renderer no longer flushes Suspense fallbacks.
  • Use global render timeout for CPU Suspense.
  • Clear the existing root content before mounting.
  • Fix a bug with error boundaries.
  • Fix a bug causing dropped updates in a suspended tree.
  • Fix a bug causing dropped render phase updates.
  • Fix a bug in SuspenseList.
  • Fix a bug causing Suspense fallback to show too early.
  • Fix a bug with class components inside SuspenseList.
  • Fix a bug with inputs that may cause updates to be dropped.
  • Fix a bug causing Suspense fallback to get stuck.
  • Don’t cut off the tail of a SuspenseList if hydrating.
  • Fix a bug in useMutableSource that may happen when getSnapshot changes.
  • Fix a tearing bug in useMutableSource.
  • Warn if calling setState outside of render but before commit.

Additional considerations must be resolved prior to upgrading Synectic to React@17.

Versions (please complete the following information):

  • OS: Linux, MacOS, Windows
  • Synectic Version: 1.0.0-beta (branch: development)

Additional context
#357 also brings up a discussion of whether to reduce the number of testing frameworks (we currently use Enzyme, React Testing Library (RTL) and Jest in combination across all tests). Several projects are now dropping the use of Enzyme and switching to RTL for all of their testing.

@nelsonni nelsonni added the bug Bug reports or bug fixes label Mar 4, 2021
@nelsonni nelsonni self-assigned this Mar 4, 2021
@nelsonni nelsonni changed the title React@17 and enzyme-adapter-react-17 Upgrading to React@17 Mar 4, 2021
@nelsonni
Copy link
Member Author

nelsonni commented Mar 4, 2021

Enzyme is currently configured to be the primary test environment for Jest (via testEnvironment: 'enzyme' in jest.config.js), which also has the following requirements:

Obviously the enzyme-adapter-react-16 will need to be replaced with enzyme-adapter-react-17 when available. However, per enzymejs/enzyme#2430 and enzymejs/enzyme#2429, an official enzyme-adapter-react-17 is still forthcoming.

@nelsonni
Copy link
Member Author

nelsonni commented Mar 4, 2021

react-dnd@13.0.0 also introduces a dependency on React v17.0.0 according to the pre-release notes in react-dnd/react-dnd#3019. This is primarily due to an internal switch to using the jsx-factory feature within React DnD.

@nelsonni nelsonni added dependencies Issues or updates to dependency files feature Feature requests or improvements labels Mar 4, 2021
@nelsonni nelsonni linked a pull request Mar 9, 2021 that will close this issue
8 tasks
nelsonni added a commit that referenced this issue Jul 1, 2021
nelsonni added a commit that referenced this issue Jul 1, 2021
@nelsonni nelsonni closed this as completed Jul 2, 2021
andrealit pushed a commit that referenced this issue Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports or bug fixes dependencies Issues or updates to dependency files feature Feature requests or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant