Am just starting to learn Reactjs, below is my
js setup how ever i keep getting
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>
<!-- Load our React component. -->
const test = <h1>This is testing</h1>;
are you sure you don’t need to compile your
Ooookayy… lemme try adding
attr to the
js script tag
I would suggest using Vite or create-react-app, the scripts are not meant for anything serious and they really offer no benefits.
Open a terminal and run
npm create vite@latest my-app -- --template react
Thanks a lot, that helped
how do i set the
npm even for all subfolders in a directory
I don’t understand the question.
Can you explain what you are trying to do?
i meat to say like setting up a dev environment for a directory that has nested folders inside it.
There is nothing preventing you from nesting folders inside the same project as long as you keep the package.json file and node_modules folder in the root and use the correct paths for the imports.
Still not sure what it is you are trying to achieve?
If you are talking about multiple projects with their own dependencies living inside a common root folder you can use something like Workspaces (all the latest package managers should have this feature now) or you can look at Monorepos.
I get the feeling it would be overkill and isn’t what you are actually looking for.
yeah, multiple projects with their own dependencies.
thanks by the way
vite is really fast even on this 4GB RAM of mine