Creates a Fela renderer which renders your React Native styles utilizing StyleSheet.create. It caches all rendered styles to be able to reuse them on future rendering cycles.


  1. config (Object?): Optional renderer configuration. The most common use case adding plugins to process styles before they get cached. (See Advanced - Renderer Configuration for further information).


(Renderer): A Renderer instance.


import { createRenderer } from 'fela-native'

const rule = props => ({
  backgroundColor: 'red',
  fontSize: props.size,
  color: 'blue'

const renderer = createRenderer()

renderer.renderRule(rule, { size: 12 })
// => { backgroundColor: 'red', fontSize: 12, color: 'blue' }

results matching ""

    No results matching ""