Video 2 (about 18 min):
https://youtu.be/e_2t2MNYDFQ
In this video, I start by installing VS Code.
I start VS Code, and then open up the React project directory created in the first video.
-
I spend a minute looking at the file hierarchy of the project, and then open up the source file for a component called Welcome, and use it to talk a little bit about how components work.
I look a little more at the files. I don't see a files called App.js or App.tsx, which is sometimes the root of the React app. In this case, I overlooked
root.tsx
, so I'll explore that in the next video. -
I start the React development server by running:
npm run dev
In the browser, I then load the site by visiting the URL printed in the terminal; as I recall, localhost:5173.
Finally for this video, I go back to the source in VS Code and demonstrate how the React dev server takes care of essentially refreshing and "Hot [Re]loading" the content that gets changed, if you edit the source code.
In the next video installment, I plan to:
- Create a new branch in git
- Create a new React component
- Discuss how state is handled in React
- Merge the working branch into main*
(*) As it happens, I didn't have time in that stream! But next time, for sure.
Top comments (0)