Git Product home page Git Product logo

Comments (5)

lstoeferle avatar lstoeferle commented on June 5, 2024 1

Removing the packages vue and @vue/vue-composition-api resolved the issue 👍. Thanks for your help 👏

from vue-demi.

noook avatar noook commented on June 5, 2024

Did you check the devtools, see if the state updated ? The state will probably display the .value key of your useLocalStorage.

It might be related to vuejs/composition-api#587 : You'll need to externalize the composition api and vue dependency from your lib build

from vue-demi.

lstoeferle avatar lstoeferle commented on June 5, 2024

Hi @noook , thanks for the hint. Externalizing the dependencies from lib build did not work.

We figured out, that the issue only appears while the lib project is linked locally to the SPA project via

npm link ~/path/to/the/lib

After using the package from the npm repository, everything works fine.

from vue-demi.

noook avatar noook commented on June 5, 2024

To prevent this kind of issue, you can remove packages vue and @vue/composition-api from the lib's node_modules. It will prevent the app from using two different instances of the composition API package.

from vue-demi.

antfu avatar antfu commented on June 5, 2024

@lstoeferle

Your snippet shows you are importing from @vue/composition-api instead of vue-demi, not sure if it's the problem.

Can you also check the dist file to see if it bundles the code from @vue/composition-api? Thanks.

from vue-demi.

Related Issues (20)

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.