Skip to content

Instantly share code, notes, and snippets.

@bensmithett
Last active August 29, 2015 14:19
Show Gist options
  • Save bensmithett/d4b2a4686065c3f52d2e to your computer and use it in GitHub Desktop.
Save bensmithett/d4b2a4686065c3f52d2e to your computer and use it in GitHub Desktop.

The app's library of UI components.

Designer owns this! Everything here is rendered in a living style guide. CSS for each component will probably live alongside here when we inevitably go down that road...

components/
  __tests__/
  button.js
  form.js

The Flux/react-router app

Screens just compose other screens or components. Every route gets its own folder & handler.

screens/
  app/
    __tests__/
    app_route_handler.js
    app_header.js
  home/
    __tests__/
    home_route_handler.js
    home_featured.js
    home_latest.js
  inbox/
    __tests__/
    inbox_route_handler.js
    inbox_sidebar.js
  inbox_stats/
    __tests__/
    inbox_stats_route_handler.js
  message/
    __tests__/
    message_route_handler.js
  styleguide/
    __tests__/
    styleguide_route_handler.js

...where routes looks something like this:

<Route handler={App}>
  <Route name="inbox" handler={Inbox}>
    <Route name="message" path=":messageId" handler={Message}/>
    <DefaultRoute handler={InboxStats}/>
  </Route>
  <Route name="styleguide" handler={Styleguide}>
  <DefaultRoute handler={Home}/>
</Route>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment