ionic icon indicating copy to clipboard operation
ionic copied to clipboard

fix for @vueuse/head doesn't function properly with ionic

Open chibx opened this issue 1 year ago • 3 comments

I created an utility function, useIonHead, that works almost the same as useHead from unhead, but just with a hack around. The function provides a way to dispose and patch the created head object just like useHead. During the process, I realized that tabbed view was a big problem when trying to create this util, and the randomness of the Ionic Hooks. The main issue was leaving from a tabbed view to a non-tabbed view and trying to mantain or destroy state. Guess What: You can nest useIonHead calls within children components and still retain the same structure after the page it was created on, is brought into view, and it's also fast as well.

chibx avatar Feb 22 '24 01:02 chibx

Deploy Preview for friendly-lamington-fb5690 canceled.

Name Link
Latest commit e2890a4e29b7781c82303ee2ab83250a62f7243b
Latest deploy log https://app.netlify.com/sites/friendly-lamington-fb5690/deploys/65d6a0500efa7c00073099b3

netlify[bot] avatar Feb 22 '24 01:02 netlify[bot]

This is fantastic! Do you think we should overwrite useHead instead of creating an additional composable?

danielroe avatar Mar 25 '24 16:03 danielroe

This is fantastic! Do you think we should overwrite useHead instead of creating an additional composable?

@danielroe Sure, I guess changing the name to useHead would be better for ease when working with ongoing projects

chibx avatar Mar 26 '24 08:03 chibx