I’ve started watching this React course tutorial from FCC yt channel and i was wondering how to create dependecies in Visual studio code and add script. Or it’s only possible in scrim?
In order to work locally you need Nodejs installed on your PC.
Then you need a development server to serve html, css, js, assets files.
Now since React Components are JSX they need to be converted into regular HTML, JS for that you need a compiler (probably babel)
How to get started locally
CDN links + local server
create-react-app setup (run this in terminal)
npx create-react-app demo-app
- Using Module Bundlers like (parcel, webpack, gulp, browserify etc.)
Personally I never used the CDN method, for very simple project with 2-3 components I use Parcel because I find it easy, and for complex projects with multiple pages I use create-react-app
when you use create-react-app or npm init command.
a package.json file is created which has some info about your project like name.
This file also has dependencies and dev-dependencies.
To add new dependency use command npm install ($PACKAGE_Name)
package.json will be updated with gsap as it’s dependency.
npm install gsap
I know this isn’t the proper guide but is enough to start exploring things out
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.