This PR makes updates to how useEffect works, mostly in prep for #173
Fixes #130
Fixes #166
Fixes #112
Changes
process existing effects
these were prepared a while ago (in #142), but we finally found a way to test them in #166
add ref parameter to useEffect.
this has been discussed for a while in #130, this solution feels the most directly applicable, in the example applications built so far.
Additional Changes
changed top level element to be <tram-one> rather than <div>, this is more clear and obvious, and won't cause formatting issues (since <tram-one> should be undecorated).
112
make the pattern parameter for useUrlParams optional (the underlying library has a default value here, so no parameter should be required).
Some underlying types were more explicitly defined
This was required to make dealing with the ref parameter in useEffect much easier (and not require wrapping in a cast to as unknown).
Version Bump: Minor
This PR adds new functionality, that should not be breaking in any previously declared way. It's not required by any means for existing projects, so minor feels like the most appropriate here.
Summary
This PR makes updates to how
useEffect
works, mostly in prep for #173Fixes #130 Fixes #166 Fixes #112
Changes
ref
parameter touseEffect
.Additional Changes
<tram-one>
rather than<div>
, this is more clear and obvious, and won't cause formatting issues (since<tram-one>
should be undecorated).112
useUrlParams
optional (the underlying library has a default value here, so no parameter should be required).ref
parameter inuseEffect
much easier (and not require wrapping in a cast toas unknown
).Version Bump: Minor
This PR adds new functionality, that should not be breaking in any previously declared way. It's not required by any means for existing projects, so minor feels like the most appropriate here.
Checklist