Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Wymagane:
- ==============
- + nodeJS
- + Visual Studio Code
- + React Developer Tools - wtyczka do Google Chrome
- + JSON Viewer - wtyczka do Google Chrome
- Wtyczki do Visual Studio Code
- =============================
- + Live Server
- + Prettier - Code formatter
- + Simple React Snippet
- $ npx create-react-app my-app
- Co potrzebujemy aby pisać w Reakcie i zobaczyć efekt:
- + biblioteka React
- + biblioteka ReactDOM
- + kompilator Babel
- <!DOCTYPE html>
- <html lang="pl">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
- <title></title>
- <!-- Plik ze stylami css -->
- <!-- <link rel="stylesheet" href="style.css"> -->
- </head>
- <body>
- <!-- Element HTML pełniący rolę kontenera dla aplikacji React -->
- <div id="root"></div>
- <!-- Biblioteka React -->
- <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
- <!-- Biblioteka React DOM -->
- <script
- crossorigin
- src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"
- ></script>
- <!-- Babel - Nie korzystamy na produkcji (tylko podczas developmentu) -->
- <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
- <!-- Nasz kod - kompilowanie JSX i ES6 do ES5 - zwróc uwagę na atrybut type (domyślnie: type='text/javascript) -->
- <script type="text/babel" src="App.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement