saft-react
v0.1.7
Published
React bindings for Saft DI
Downloads
4
Readme
saft-react
React bindings for Saft DI
Install
npm install --save saft-react
Usage
import * as React from 'react'
import {Saft, inject} from 'saft-react'
@inject('mySaftKey')
class MyComponent extends React.Component {
render() {
const mySaftKey = this.props.mySaftKey;
//...
}
}
class Example extends React.Component {
render () {
return (
<Saft injector={saftInjector}>
<Multiple>
<Levels>
<Of>
<Components>
<MyComponent />
</Components>
</Of>
</Levels>
</Multiple>
</Saft>
)
}
}
License
MIT © surikaterna