Static GitHub Issues

[2717] Pass Data into Transition

prev: How to exclude some routes when using nuxt generate
next: Incorrect route generated for page name with underscore

I'm trying to pass data into a transition to conditionally render leaving animations. However, when I try to get info from either the Data or Computed sections, it always returns undefined. I have an example setup below.

export default {
  data() {
    return {
      testingData: true
    }
  },
  transition: {
    mode: 'out-in',

    ** // This returns 'Undefined'**
    console.log(this.testingData)
    ** // This returns 'Undefined'**

  if (this.testingData != true) {
     RUN GSAP CODE
    } else {
     RUN DIFFERENT GSAP CODE
    }
}

I still get the issue of undefined when using computed data as well. Is their any recommended way to pass data to a transition? If I set variables within the transition, everything works as expected. Just having trouble accessing my vuex store. This is kind of related to issue #1960 Thank you so much for the advice!

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2361">#c2361</a>)</em></sub></div>