Npm – Yearn – React – instalacja

Jeśli jest zainstalowany npm

# npm install --global yarn

# yarn --version

Errors brak dostępu z powodu niepodpisanego skryptu

PowerShell – jako administrator – zdejmujemy zabezpieczenia

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

https://learn.microsoft.com/pl-pl/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3
# yarn --version
1.22.19

Instalacja React – w katalogu client (tworzy nowy katalog client)

 # yarn create react-app client
Success! Created client at C:\Users\jorna\Desktop\hp\projekt\client
Inside that directory, you can run several commands:

  yarn start
    Starts the development server.

  yarn build
    Bundles the app into static files for production.

  yarn test
    Starts the test runner.

  yarn eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!

We suggest that you begin by typing:

  cd client
  yarn start

Dołączenie biblioteki routingu – wersja dla DOM

# cd client/
# yarn add react-router-dom
# npm list
 react-router-dom@6.16.0
 react@18.2.0