mathieudutour / react-progress-button

:cyclone: Simple react.js component for an inline progress indicator

Home Page:https://mathieudutour.github.io/react-progress-button

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button state as props

mbahoshy opened this issue · comments

Hey there, great component. I do have one suggestion though, it would be really nice to change button state through props instead of having to use ref to keep track. I am using this in my own project and wrote a simple wrapper to do just that. Here is a gist of what I'm using in a project
https://gist.github.com/mbahoshy/a67e02dfc8d146753cc2

(it is not using all of the props you offer, just the few I need... but you'll get the idea)

You can already do that using the state prop. Or am I misunderstanding?

Totally missed that in the readme, thanks