Skip to content

Write a React wrapper #2

Open
Open
@dmitriz

Description

@dmitriz

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions