On Complicated State in React

14 Jul 2017

As I thought, getting Skills off the ground was not easy. Not as hard as I was imagining it to be, but still not easy.

A character can have zero or more Skills, but the character object in the builder needs to know all of the following things for each of them:

Skills obviously have other things to keep track of, such as their description and level speed, but these things aren’t needed outside the skill itself. These are in the Skill Constants file, and are in the process of being added.

Then given the fairly large number of ancestors between “individual Skill view” and “character state container”, wiring up “this thing has changed” handling to alter the state accordingly was a bit of a challenge.

I’ll need to apply the same logic on a larger scale when Skills are finished and it’s time to move on to Techniques.