vigetlabs / microcosm

Flux with actions at center stage. Write optimistic updates, cancel requests, and track changes with ease.
http://code.viget.com/microcosm/
MIT License
487 stars 29 forks source link

ActionButton and ActionForm should be referenceable via refs #446

Closed nhunzaker closed 6 years ago

nhunzaker commented 6 years ago

You should be able to do:

class Test extends React.Component {
  render() {
    return (
      <ActionForm
        ref={form => (this.form = form)}
        action="test"
        send={send}
      />
    )
  }
}

Right now you get a warning about refs in React. I think this is an issue on React's end, but we can circumvent it.