- 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