Giter VIP home page Giter VIP logo

Comments (7)

pedronauck avatar pedronauck commented on May 5, 2024 2

I didn't try <PropsTable> using oneOfType in prop types, I will see what's happening. Thanks guys ✌️

from docz.

emersonlaurentino avatar emersonlaurentino commented on May 5, 2024 1

@albinekb the problem is similar, so i believe we can keep it here.

these also have the same problem:

propTypes = {
  optionalMessage: PropTypes.instanceOf(Message),
  optionalEnum: PropTypes.oneOf(['News', 'Photos']),
  optionalUnion: PropTypes.oneOfType([
    PropTypes.string,
    PropTypes.number,
    PropTypes.instanceOf(Message)
  ]),
  optionalArrayOf: PropTypes.arrayOf(PropTypes.number),
  optionalObjectOf: PropTypes.objectOf(PropTypes.number),
  optionalObjectWithShape: PropTypes.shape({
    color: PropTypes.string,
    fontSize: PropTypes.number
  }),
}

from docz.

albinekb avatar albinekb commented on May 5, 2024 1

@renatorib I made my own, if you want to have a look: https://gist.github.com/albinekb/f59feb84273279d1d45f603aee8eb496

from docz.

renatorib avatar renatorib commented on May 5, 2024 1

Looks great @albinekb

from docz.

emersonlaurentino avatar emersonlaurentino commented on May 5, 2024

Hey @louis-pvs I'm having the same problem.

I belive that problem is PropTypes.oneOfType. If you stop use it, the error not is shown.

from docz.

albinekb avatar albinekb commented on May 5, 2024

Similar issue with .instanceOf:

propTypes = {
  date: PropTypes.instanceOf(Date),
}

Should I open another issue for this?

from docz.

renatorib avatar renatorib commented on May 5, 2024

I started work on that bug.

from docz.

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.