React Native on android  iOS and … end?

Andrii Chubai

React Native for Web

But it works!

Nicolas Gallagher

Currently, works on the React Core team.

Previously, Technical Lead for Twitter's JavaScript technology platform

@necolas

How it works?

// 5

// 0

RN

Web

Benefits

  • Generates only used CSS rules; 
  • Critical CSS.
  • Support for RTL layouts.
  • CSS file 75% less.
  • Good performance.

Setup

  • Add dependency 
  • Create a new RN project or take an existing one

You will also need two extra files:

  • index.web.js
  • index.html 
  • Add alias for react-native
  • Add native modules to babel-loader

Platform-specific code

Problems

npm link?

wml

Dependencies

  • Web and mobile look the same

  • Slow updates of RNfW

  • Not all modules/components covered

  • Complex debugging

  • Slow development

  • HTML is not semantic

  • You can use only that libraries that build on top of React Native primitives

Where to use

  • Documentation (web player)
  • Components sharing

  • e.t.c

Bonus

What about Windows?

react-native-windows

What about MacOS?

react-native-macos

 

 

What about all together?

reactxp

 

 

The End

React native on android iOS and … end?

By Andrii Chubai

React native on android iOS and … end?

  • 127