react-falcor

React binding for Falcor


Keywords
falcor, react
License
MIT
Install
npm install react-falcor@0.2.1

Documentation

react-falcor

React binding for Falcor.

Installation

npm install react-falcor --save

Usage

import { Model } from 'falcor'
import HttpDataSource from 'falcor-http-datasource'

import { Provider, falcorGet } from 'react-falcor'
import React from 'react'
import ReactDOM from 'react-dom'

const falcor = new Model({
  source: new HttpDataSource('/model.json'),
})

const App = falcorGet([
  ['greeting'],
])(({ greeting }) => <p>{greeting}</p>)

ReactDOM.render(
  <Provider falcor={falcor}>
    <App />
  </Provider>,
  document.getElementById('container'),
)

Similar Effort

  • falcor-react
  • atreyu has a similar design to this library. For some reason, the author did not publish it to npm.