Partage
  • Partager sur Facebook
  • Partager sur Twitter

Create-react-app obsoléte ?

    29 mars 2024 à 11:49:24

    Bonjour, 

    J'ai voulu créer une app react en suivant cette documentation :

    https://fr.legacy.reactjs.org/docs/getting-started.html mais -> These docs are old and won’t be updated. Go toreact.devfor the new React docs.

    The new Quick Start teaches modern React and includes live examples. 

    Sauf que dans la nouvelle doc, on me parle seulement de Next.Js

    Et comme warning avec le create-app : 

    One of your dependencies, babel-preset-react-app, is importing the
    
    "@babel/plugin-proposal-private-property-in-object" package without
    
    declaring it in its dependencies. This is currently working because
    
    "@babel/plugin-proposal-private-property-in-object" is already in your
    
    node_modules folder for unrelated reasons, but it may break at any time.
    
    
    
    babel-preset-react-app is part of the create-react-app project, which
    
    is not maintianed anymore. It is thus unlikely that this bug will
    
    ever be fixed. Add "@babel/plugin-proposal-private-property-in-object" to
    
    your devDependencies to work around this error. This will make this message
    
    go away.



    Comment pallier à ça ?

    -
    Edité par RolloRagnar 29 mars 2024 à 12:01:45

    • Partager sur Facebook
    • Partager sur Twitter
      21 avril 2024 à 22:41:49

      Hello

      Pour faire simple, la team React s'est beaucoup rapprochée du projet Next.js et du coup ils mettent cette solution en avant plutôt que create-react-app. Cela n'en fait pas moins une solution obsolète au contraire (les messages que tu vois sont des warnings, que je te laisse lire et interpréter)

      Comme solution alternative à CRA et que je préfère perso pour sa rapidité, il y a Vite.jsGetting Started | Vite (vitejs.dev)

      npm create vite@latest ton-projet -- --template react



      • Partager sur Facebook
      • Partager sur Twitter

      Create-react-app obsoléte ?

      × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
      • Editeur
      • Markdown