Skip to content

Simple, non-redux example improvements #138

@justin808

Description

@justin808
  1. This should take props so as not to depend on the first ajax request: https://github.com/shakacode/react_on_rails/blob/master/app/assets/javascripts/react_on_rails.js#L159
  2. We should not be passing empty props here:
    <%= react_component('SimpleCommentScreen', {}, generator_function: false, prerender: false) %>
  3. We need to break this up into a container component that does the Ajax call and a view component.
    See article on Container Components. This is the file to break up: https://github.com/shakacode/react-webpack-rails-tutorial/blob/master/client/app/components/SimpleCommentScreen.jsx
  4. Change /app/assets/javascripts/application.js to not have rails specific startup code. See comment here

@robwise We'll need to incorporate this into the generator.

@josiasds Would you like to take this one on?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions