Skip to content

luggagejs/react-luggage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-luggage

build status

React components for Luggage.js

Usage

import { Luggage, withCollection } from 'react-luggage'

class App extends React.Component {
  render() {
    return (
      <Luggage
        apiKey='someapikey'
        redirectUrl='/app'
      >
        <RecipesCollection />
      </Luggage>
    )
  }
}

class Recipes extends React.Component {
  static propTypes = {
    recipes: React.PropTypes.array
  }

  static defaultProps = {
    recipes: []
  }

  render() {
    const { recipes } = this.props

    return (
      <div className='recipes'>
        { recipes.map(recipe => <div>{recipe.title}</div>) }
      </div>
    )
  }
}

const RecipesCollection = withCollection('recipes')(Recipes)

About

React components for Luggage.js

Resources

Stars

Watchers

Forks

Packages

No packages published