Open OliverSpeir opened 2 months ago
We always want to keep our users on a happy path!
Is anyone interested in taking a closer look at docs and suggesting some improvements?
Just pinging this for freshness in case anyone is interested in taking this on!
📋 Explain your issue
The /view-transitions/#script-re-execution section I think is not correctly directing users to the truly happy path. Ideally for most users a lifecycle event would be listened for in order to deal with script rexecution.
data-astro-rerun
should only be used when necessary, after considering using a lifecycle event.Commonly users might reach for
data-astro-rerun
when in fact they want to only run a callback on certain pages. This section could help users stay on the happy path by giving an example of checking if an element is on the page before running a function related to it like this example.