Skip to content

How would it be possible to use beforeDestroy in vue function api #72

@chrismichaelps

Description

@chrismichaelps

Hi devs,

I want to know how it is possible to use beforeDestroy in the setup () component.
I need to delete some data when I leave a particular section.

When I define beforeDestroy() as:
It shows me an error that I cannot use beforeDestroy within the setup() component.
If there is an equivalent to beforeDestroy() and can you tell me or help how to make it work, I will appreciate it.

<script>
  import {value , onCreated, watch} from 'vue-function-api';
 
  export default{
    name: "Section",
    setup(){
      beforeDestroy(){
        
      }
      return{
      }
    }
  };
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions