Skip to content

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