rofrischmann/react-look

View on GitHub
packages/react-look-native/docs/api/LookRoot.md

Summary

Maintainability
Test Coverage
# 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>`.<br>


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

## Usage
```javascript
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)
```