Convert all snippets to use hooks
atomiks opened this issue · 3 comments
Hooks have been officially merged and will be released soon, they're the recommended way to create components moving forward.
When you’re ready, we’d encourage you to start trying Hooks in new components you write.
I think we should discourage using classes and use function components + hooks for everything. This also negates the "public class fields" debate that was happening here last year lol.
Yep, I agree with this 100%. Fewer patterns to learn, more consistent, more in line with our other projects and generally less complicated. Let's start transforming existing snippets and updating PRs before merging, then!
This should work for most examples as I think we have extremely few that would use derived state in a constructor.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.