Skip to content
This repository has been archived by the owner on Nov 12, 2017. It is now read-only.

Latest commit

 

History

History
26 lines (20 loc) · 734 Bytes

File metadata and controls

26 lines (20 loc) · 734 Bytes

LookRoot

<LookRoot> is a React Component used to wrap your whole application to pass down configuration. It is similar to e.g. Redux's <Provider>.

props

| Property | Description | | --- | ----------- | | config | global Look configuration, will automatically be spread to all child Components using context. |

Usage

import React, { Component } from 'react'
import { Presets, Plugins, LookRoot } from 'react-look-native'
import { AppRegistry }  from 'react-native'
import App from './index'

const composedConfig = Presets['react-native']

const Container = () => (
  <LookRoot config={composedConfig}>
    <App />
  </LookRoot>
)
AppRegistry.registerComponent('native', () => Container)