Open awongh opened 5 years ago
This is pretty awesome, thanks. But maybe we should make this a new example instead of modifying the old one? It could be called react-hooks-js-buy-sdk
? Hooks are brand new so I'm wary of just replacing the existing one.
Yea, I can definitely do that.
Unless you want to just leave the pull request open just for other's reference. At some time in the future the non-component class syntax for react will become the standard, I assume?
Up to you 😄 But yeah I assume it will become the standard at some point.
I created a working example of the react-js-buy example with the new react hooks syntax.
React is moving away from component classes in 16.8.1
Context: https://reactjs.org/docs/hooks-intro.html
Thanks :)