cynicaloptimist / improved-initiative

Combat tracker for Dungeons and Dragons (D&D) 5th Edition
https://www.patreon.com/improvedinitiative
MIT License
311 stars 108 forks source link

Migrate Spell Editor to React #201

Open cynicaloptimist opened 6 years ago

cynicaloptimist commented 6 years ago

The StatBlock and Spell editors are currently implemented as Knockout components.

Right now, StatBlockEditor.ts has a lot of complexity involved in converting all of the properties of StatBlock to observables, to be bound in the viewmodel. Converting the HTML template to a react component will basically require a complete rewrite.

For some patterns to follow, take a look at other components that have recently been added to the project. StatBlock.tsx is an example of a component that is being migrated from an existing HTML component, and CustomCSSEditor.tsx is an example of how to build a form in React used to update a JSON structure.

cynicaloptimist commented 6 years ago

This is done for the StatBlockEditor, but the SpellEditor still needs migrated.