Skip to content

add destroy funciton #14

@wennerryle

Description

@wennerryle

hey, i install your library with sveltekit, and when i change the page your library is broking

it's because of the model of changing pages, i'd like to have a function where i can destroy your library and reinstall it

ex.:

react:

useEffect(() => {
    const previewer = new ImagePreviewer("#images");
    return previewer.destroy();
}, [images])

svelte:

onMount(() => {
   const previewer  = new ImagePreviewer("#images");
   return previewer.destroy();
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions