Update signature of component({tag, styles, render}): these names avoid collision with css template tag
Update signature of SpellcasterElement to use styles(), render() methods
Remove setState method from SpellcasterElement. The property accessors are sufficient.
Check for state equality before rebuilding shadow
Update signature of returned component create() method to take props, allowing state to be set as a prop, and allowing classes, etc to be set on components, in addition to state.
Fix type signature of component: we previously had the generic T in the wrong place
A fix that introduces a breaking change.
Fixes https://github.com/gordonbrander/spellcaster/issues/55
component({tag, styles, render})
: these names avoid collision withcss
template tagSpellcasterElement
to usestyles()
,render()
methodssetState
method fromSpellcasterElement
. The property accessors are sufficient.state
equality before rebuilding shadowcreate()
method to take props, allowing state to be set as a prop, and allowing classes, etc to be set on components, in addition to state.T
in the wrong place