One question in dependecies with React

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?

this is the tutorial React Course - Beginner's Tutorial for React JavaScript Library [2022] - YouTube

Hello @franciscomonellole

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

  1. CDN links + local server

  2. create-react-app setup (run this in terminal)

npx create-react-app demo-app
cd demo-app
npm start
  1. 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

Dependency list

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 :upside_down_face:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.