Skip to content
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

Configurable view helper #346

Merged
merged 3 commits into from
Sep 4, 2015
Merged

Configurable view helper #346

merged 3 commits into from
Sep 4, 2015

Conversation

rmosolgo
Copy link
Member

This is my suggestion for a stateful view helper.

  • The react_component helper is actually delegated to an internal class, the "implementation class"
  • The implementation class is instantiated once per request
  • The implementation class has #setup(env) and #teardown(env) methods, in case you're trying to manage state inside the ExecJS environment

This adds an extension point to react-rails: if you want more functionality out of the react_component helper, you can provide a new implementation class.

rmosolgo pushed a commit that referenced this pull request Sep 4, 2015
@rmosolgo rmosolgo merged commit a69367a into reactjs:master Sep 4, 2015
@rmosolgo rmosolgo deleted the configurable-view-helper branch September 4, 2015 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants