Closed devniel closed 3 months ago
thank you! will merge you PR, we can do a bit of refactoring later!
for some context about why this changed:
until to a few days ago, the useTimeline()
stored a copy of the .clap file,
but this was a bit redundant and confusing (ie. should we modify segments
or clap.segments
etc)
so I've removed this copy of .clap file and exposed all the content directly in the store (but meta is still a nested object, which can be a bit tricky to handle)
Hi,
The
useEffect
withgetClap
was not detecting changes, refactoring it to usemeta
is a simple fix but I think a better approach is to fill the proper store when settingtimeline.setClap()
to avoid complications withuseEffect
apart of avoiding additional renders. An even better approach could be to have a global store where to proxy calls toTimelineStore
andScriptEditorStore
via a uniquesetClap
, I think we could do that in the future.