Skip to content

Instantly share code, notes, and snippets.

@jleo3
Last active October 20, 2015 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jleo3/e7833ef7c55e09fada4c to your computer and use it in GitHub Desktop.
Save jleo3/e7833ef7c55e09fada4c to your computer and use it in GitHub Desktop.
  • use the react-rails gem
  • generator will create an app/assets/javascripts/components/ dir
  • In the view:
<%= react_component 'Records', { data: @records } %
  • Learn to use @state with @setState, a React method that will perform 2 actions.

  • Where does @props get initialized?

  • Have a look at Jest for unit testing.

    • Built on top of Jasmine
    • The tool that FB uses
  • Built in Test Utilities for React

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment