flamethrower icon indicating copy to clipboard operation
flamethrower copied to clipboard

flamefthrower-preserve

Open prowebat opened this issue 2 years ago • 0 comments

dear @codediodeio

thank you for merging the flamethrower-preserve option from https://github.com/fireship-io/flamethrower/issues/54#issuecomment-1228042098_

, but your code changes break a part of my original intended usecase, i try to explain: the preserve option should preserve the node when navigating to other pages, so it does not get reinitiated. this is useful for eg. a react widget (see your counter example), which loads a blog feed. and won't need to reload it on each page navigation. -> i think your changes will achieve this also, but i haven't tested it yet.

the additional usecase of my original pull request was to also update the attributes and children of the flamethrower-preserve web component. the web component can then listen for any attribute changes, or child changes and react accordingly. eg. an <menu selectedNode="aaa"> element can liste for changes of the selectedNode attribute, which gets updated when navigation to the next page, the menu element itself won't get reinitialized.

regards, daniel.

prowebat avatar Aug 30 '22 07:08 prowebat