Should I install NPM package for another folder?

I am very new in React JSx,
I practiced on react “prod”, so I installed npm package in a folder, now I am about to practice on react “statefull and stateless components”, I want to keep these folder independent, Should I install again npm package for the new pract ie react “statefull and stateless components”?

It is a good practice to install packages that you want to require in your program locally at the root of your new project, but it is possible to install them globally and link them in various different projects. More about that here:

I would avoid installing packages globally.

One option to make it easier to practice with little react apps would be to use an online editor like codesandbox or stackblitz.