Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 1.74 KB

File metadata and controls

49 lines (40 loc) · 1.74 KB

react-native-css-nitro

rect-native-css ported to C++ for performance. This is a prototype and not production ready. Ideally this eventually be react-native-css@4.0.0

Description

This library is a port of react-native-css to C++ for performance. It will eventually be a drop in replacement for react-native-css and they will share the same compiler.

Unlike react-native-css, the majority of the processing is done off thread in C++. When styles are updated they are directly applied to the Shadow Tree nodes.

There are two exceptions where styles are applied via a React re-render:

  • A non-style prop is changed (e.g caretColor)
  • The component is animated (the component has a transition or animation style)

Progress

These are the features that are "done", in that they pass basic testing. More complex testing is needed to ensure they work in all cases.

  • Dynamic styles - shadow tree
  • Dynamic styles - JS rerender
  • Style hot reload - shadow tree
  • Style hot reload- JS rerender
  • Web
  • Multiple style rules
  • Specificity sorting
  • Pseudo classes
  • Media query
  • Attribute selectors
  • Container named queries
  • Container media queries
  • Dynamic Variables
  • Inline Variables
  • Global variables w/ media queries
  • Animations
  • Transitions
  • Transform
  • Filter
  • Important styles
  • Important props
  • Safe area units
  • Em & currentColor
  • CSS functions (min, max, platform functions, etc)
  • Metro
  • Update compiler to new syntax (switch tuples to objects)
  • Shorthand runtime styles
  • Native component wrappers (e.g TextInput, ScrollView, etc)
  • 3rd party hook (nativeStyleToProp, etc)
  • 3rd party Alt style props (e.g headerStyle)