Giter Club home page Giter Club logo

nuxt-2-to-nuxt-bridge-changes's Introduction

Packages

  • @changes: "nuxt": "^2.15.8" -> "nuxt-edge": "latest"
  • @removed: "@nuxt/typescript-build": "latest"
  • @removed: "@nuxtjs/composition-api": "^0.32.0"

@nuxt/composition-api

  • @removed: import {} from '@nuxt/composition-api'
  • @changed: useContext() -> useNuxtApp()
    note: any keys that previously exists in useContext() is now moved into useNuxtApp().nuxt2Context, so you can't directly use it from useNuxtApp()
  • @changes: route (previously in useContext()) is no longer in ref, so you should directly use the value of it, for example:
    • before: const currentRoute = route.value.name
    • is now: const currentRoute = route.name

Miscellaneous

  • $config & this.$config is now separated into 2 types, app and public (which configured in nuxt.config.ts -> publicRuntimeConfig)
    so, if you want to use any configs that defined in publicRuntimeConfig you should use $config.public
  • Don't know why but seems like you don't need to re-import composable file in every files that need it, for example if you have already imported a composable file in /layouts/Layout.vue, then you don't need to re-import it when you want to use it in the child component
  • Template refs is not working, the value is encapsulated in _setupState
    • before: someElementRef.value.callTheFunction()
    • after: someElementRef.value._setupState.callTheFunction()

nuxt-2-to-nuxt-bridge-changes's People

Contributors

nor1c avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.