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

Write a React wrapper #2

Open
dmitriz opened this issue May 16, 2017 · 0 comments
Open

Write a React wrapper #2

dmitriz opened this issue May 16, 2017 · 0 comments

Comments

@dmitriz
Copy link
Owner

dmitriz commented May 16, 2017

Enable to wrap uncomponents as React components to
make them available in any React app.

As described here:
funkia/turbine#34

The main idea is to configure the mount wrapper, when no element el is passed,
to return a React component written as

({ model, view }) => class extends React.Component {
    constructor () {
         super()

         // tell React to update in reactions on stream events
         stateStream.map(this.forceUpdate)
    }
    render = () => view(state)
}
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

No branches or pull requests

1 participant