how to instal react.js in the same webapp.
how to instal react.js in the same webapp.
React is just javascript. Just make sure that you're serving the static files for the react and that you're including the react in your html where you want to use it.
it just giving me this error. i'm trying to install react using bash console.
or in text it throws this error
(django2) 20:18 ~/mysite/frontend $ npx create-react-app gui
bash: npx: command not found
(django2) 20:19 ~/mysite/frontend $ npm init react-app gui
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible defaults.
See `npm help json` for definitive documentation on these fields
and exactly what they do.
Use `npm install <pkg> --save` afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit.
name: (frontend)
The second command looks like it's running correctly; what happens if you provide it with the data it asks for and let it run to completion?
throwing this error
Sorry, name can only contain URL-friendly characters and name can no longer contain capital letters.
name: (frontend) name: (frontend)
[1]+ Stopped npm init react-app gui
(django2) 20:28 ~/mysite/frontend $
What i want to accomplish is install the react and hook it up with my django rest framework api. A guidence will help a lot.
i don"t know how to install react.js in python anywhere. i have my django server running and i want to install react.js then configured it to use the api.
"[1]+ Stopped" means that you pressed Ctrl+Z and send the process to the background.
Run fg
command to get it back.