question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The future of React Native for Web

See original GitHub issue

Over the next few months I’ll be working through some significant changes to React Native for Web. These changes will be made on the next branch. The motivation for these changes is to:

  1. Update the library to use modern React features (e.g., Hooks) in preparation for Concurrent Mode.
  2. Move away from depending on ReactDOM’s unstable-native-dependencies export, which we’d like to remove from ReactDOM.
  3. Resolve long-standing issues with the Responder Event Plugin.
  4. Prototype high-level gesture systems for ReactDOM.
  5. Simplify and improve the performance of the Touchable/Pressable components.

Hooks rewrite (done)

Rewriting components to use Hooks is a prerequisite for all the other changes. Hooks simplify the implementations of components and offer an opportunity to resolve many existing bugs.

Responder system rewrite (done)

Replacing the Responder Event System with a user-space implementation. See #1568 for more details.

Touchables rewrite (done)

Better integrating the PressResponder with DOM expectations, to improve the UX of Touchables. See #1591 for more details.

Canary releases

Most up-to-date canary is shown below. Please report regressions caused by canary releases. Post a comment below and include the canary version, as well as a codesandbox that reproduces the issue if possible.

0.0.0-d33e107ba (5 June 2020)

  • Changed: Remove hitSlop prop handling. Let browsers use their own automatic hitslop for touch interactions.
  • Changed: Remove TabBarIOS and TimePickerAndroid exports
  • Changed: Rewrite of the gesture responder system
  • Changed: All components (except vendor ones) implemented using React Hooks. This build regresses Image caching, which will be reintroduced before a stable release.
  • Changed: The onLayout prop now requires a ResizeObserver polyfill to work, and does not fallback to window resize events.
  • Changed: Forwarding of data-* props is no longer supported. Use dataSet props, e.g., dataSet={{ 'some-key': 1 }}.
  • Changed: Each component explicitly forwards supported props.
  • Added: Pressable
  • Added: View support for accessibilityValue.
  • Fixed: Image support for variable resolution images (requires bundler integration).
  • Fixed: TextInput support for onContentSizeChange to allow auto-grow textareas.
  • Fixed: A limitation in setting styles using ref.setNativeProps.

Open canary issues

  • Remove use of findNodeHandle in ScrollResponder
  • Unit tests for PressResponder.
  • Image loading doesn’t use a cache.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:495
  • Comments:63 (50 by maintainers)

github_iconTop GitHub Comments

23reactions
necolascommented, Jun 26, 2020

Closing as 0.13 is released

20reactions
necolascommented, May 7, 2020

Latest canary 0.0.0-132218901. See OP for notes.

If there’s no further feedback by next week this will be going into master.

@EvanBacon for expo @paularmstrong and @comp615 for Twitter PWA @xcarpentier for react-native-gifted-chat @satya164 for react-navigation and react-native-paper

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is the Future of React Native? - Brainhub
Everything indicates that the future of React Native is bright: from its thriving community to its momentum to the long-term plans of its...
Read more >
React Native For Web: A Glimpse Into The Future
React Native for Web is intended to let you write a single app that runs in a browser using standard web technologies, or...
Read more >
React Native in 2022 and Beyond - Semaphore CI
Bringing all of these amazing React features to React Native will revolutionize the world of native mobile, desktop, and tv apps. The new...
Read more >
State Of React Native Development In 2022 - Ideamotive
Facebook will use early releases of React Native, such as the new renderer (Fabric) and native modules, to create an init path. This...
Read more >
What Is The Future Of React Native In 2022? - Cuneiform
React Native offers improved performance through native controls and modules. The open-source framework runs native APIs and the User Interface ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found