Giter VIP home page Giter VIP logo

Comments (5)

fkhadra avatar fkhadra commented on May 18, 2024 1

Thanks for the precision, I understand better know 😁. I'll fix it tonight.

from react-toastify.

fkhadra avatar fkhadra commented on May 18, 2024

Hello @lorenzos,
Last week I was asking myself: "react should be considered a dependency or a peer dependency ?"
Then I forgot about it 😮.

If I define react as a peer dependency, it means that when you install the package you always get the latest version of react? Am I right?

After reading that : dependency types

I totally agree with you.

from react-toastify.

fkhadra avatar fkhadra commented on May 18, 2024

Ok, I should have read the title 2 times.
Sorry for the spam

from react-toastify.

lorenzos avatar lorenzos commented on May 18, 2024

If I define react as a peer dependency, it means that when you install the package you always get the latest version of react? Am I right?

I can be wrong, but I think you're exactly not right 😄 The peer dependency is made exactly for the purpose of not be downloaded as a required dependency of your package. It means something like this package should go along this one, but it'll be the user of my package to specify it as a dependency of her app. And, thinking about it, that's what all React components should do (and in fact, everyone else do).

If you want to dig deeper, I suggest you this: https://nodejs.org/en/blog/npm/peer-dependencies/

from react-toastify.

fkhadra avatar fkhadra commented on May 18, 2024

@lorenzos package updated thanks for the advice !

from react-toastify.

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.