I’m new to react and need to learn the Functional components with Yahtzee game but all i can find with that game are class components. :")
Can anyone please refactor one example of it to a functional version of Yahtzee game?
if someone can do so that I can use it as a reference, i will be very thankful!
one example of what I’m looking for :
Demo
What have you tried so far? Functional components in React can often be straightforward to convert from a class syntax. Here is a short refresher: Stateless Functional Components
If you are just starting with this conversion, one tip is to start small and convert each class components individually and make sure your app still works.
That’s the thing, i did try but i keep receiving errors, that’s why i want a full version so i can figure out where im going wrong.
Can you post the version you tried?
Also, this earlier post seems similar to what you are looking for: Refactoring a class component to Functional, Invalid value