-
-
Notifications
You must be signed in to change notification settings - Fork 637
Support direct react components and server console messages and linting #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add support to React components generated with React.createClass() - Add “generator” property to allow creating a React component via a function - Add HelloES5 component to the dummy application
- Renaming Ruby variables to snake case - Make ReactRenderer#render_js_react_element a class method - Improve generated JS code
* Added console & error logging * Catch exceptions and log them on the server side * Issue with HelloWorld component is not loade properly. Visit /focused to see the issue * Created /focused so that a specific part can be individually tested. * Lots of cleanup and refactoring. * Consistency with using suffix App for generator functions * Added default for generator_function
@alexfedoseev @josiasds Please pull this code. I need some help. This is really close, but if you go to http://localhost:3000/focused then you'll see the error which is that the HelloWorld component is not found. This is doing simple client rendering. Same issue server rendering. Thanks. Also, we added the option for the helper of |
@@ -1,7 +1,7 @@ | |||
import React from 'react'; | |||
|
|||
// Super simple example of the simplest possible React component | |||
export default class HelloWorld extends React.Component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to split definition and export if we don't do anything with exported class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexfedoseev We don't need to split. We were experimenting. Voodoo coding.
|
||
<<-HTML.strip_heredoc.html_safe | ||
#{data_from_server_script_tag} | ||
#{rendered_output} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be aligned?
index.html.erb crashing need to put all the example in separate web pages with clear explanations of what is being demonstrated
* Also catches when generator_function is set to true when it's not a generator function. * Reuse the same catch on both client and server. * Started to format JS code better. * Some readme improvements
@@ -88,10 +109,11 @@ Contributions and pull requests welcome! | |||
|
|||
## Installation | |||
|
|||
Add this line to your application's Gemfile: | |||
Add these linesto your application's Gemfile, sustituting your preferable JavaScript engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "these lines to"
# Conflicts: # README.md # spec/dummy/Gemfile.lock # spec/dummy/bin/setup # spec/dummy/spec/rails_helper.rb # spec/dummy/spec/spec_helper.rb
All tests passing
Support direct react components and server console messages and linting
Visit /focused to see the issue
Replace #19