Coder Social home page Coder Social logo

Comments (2)

gluxon avatar gluxon commented on June 30, 2024

Thanks for reporting a bug!

React.JSX.Element was introduced in@types/[email protected].

It looks like that change also edited @types/react versions v15, v16, and v17. 🤔

Adi updated the minimum Blueprint supported version to v16.14.41 here: #6634

@types/react is now on the latest v16 typings. There was a change to deprecate the global JSX namespace in favor of the React.JSX namespace in May 2023 via DefinitelyTyped/DefinitelyTyped@f1b2559, which was released in v16.14.41, so that is now the new minimum supported version of React types.

I think the right fix here is to be more specific Blueprint's @types/react peer dependencies and include minimum versions for 17.x and 18.x as well. Example:

{
  "peerDependencies": {
    "@types/react": "^16.14.41 || ^17.0.59 || ^18.2.6"
  }
}

I'm hesitant to go back to the unnamespaced JSX.Element since that's deprecated, even on older versions of @types/react.

@MatthewHerbst Does the above make sense? Could you upgrade your project to @types/[email protected] or greater?

from blueprint.

MatthewHerbst avatar MatthewHerbst commented on June 30, 2024

Thanks for the response, @types/[email protected] works!

My main reasoning for suggesting returning to JSX.Element was to avoid any potential semver major version change issue (not sure if that's required for the peer dep change being asked for, but I think technically it is?). Will let y'all decide on that though, a patch version with clear docs about why folks might be getting new peer dep warnings is probably fine since they don't need to make a major version change to @types/react. Thanks!

from blueprint.

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.