DEV Community

LordDarthViadro
LordDarthViadro

Posted on

Questions about designing state logic for first react app

Hi, im trying to learn react by creating a simple app but i have a hard time comming up with state logic.
Concept of the app: The App lets user create an RPG character by selecting a number of skills from the skill pool. Skills are selected from the drop down menus, all menus have the same selection of skills but each skill can be selected only once.

So what i understand so far is that there should be a state that contains data about what skills are selected. It should be updated when user selects one skill from one of the dropdown menu. Then after a state update each option with selected skill in other dropdown menus should be disabled, but how do i do that? I am trying to use hooks, so is this a good place to use useEffect hook?

Top comments (0)