[英]How to Start Server for ReactJS using yarn as a beginner
I started learning ReactJS today since I know some JavaScript. 我从今天开始学习ReactJS,因为我了解一些JavaScript。
Now, I want to know how I start something like this: 现在,我想知道如何开始这样的事情:
I have installed Node.js on Windows, and after that, I was able to do this: 我已经在Windows上安装了Node.js,在那之后,我能够做到这一点:
npm install -g yarn
Which gave a reply of this sort: 给出了这样的答复:
C:\Users\XXX\AppData\Roaming\npm\yarnpkg -> C:\Users\EMI\AppData\Roaming\npm\nod
e_modules\yarn\bin\yarn.js
C:\Users\XXX\AppData\Roaming\npm\yarn -> C:\Users\EMI\AppData\Roaming\npm\node_m
odules\yarn\bin\yarn.js
+ yarn@1.7.0
updated 1 package in 16.303s
From my understanding, it means that the application was installed correctly. 据我了解,这意味着该应用程序已正确安装。
How do I start the server to show a simple "Hello World" program in ReactJS using Yarn? 如何使用Yarn启动服务器以在ReactJS中显示一个简单的“ Hello World”程序?
Yarn is only a package manager. Yarn只是程序包管理器。 If you want to start a server to show a simple Hello World program, I'd suggest using something like create-react-app or write your own express server
如果要启动服务器以显示简单的Hello World程序,建议您使用诸如create-react-app之类的工具或编写自己的Express服务器
If you are starting to learn react, knowing about create-react-app is highly useful. 如果您开始学习反应,那么了解create-react-app非常有用。 YOu can visit the page for more information which has good description on how to start your hello world and much more.
您可以访问该页面以获取更多信息,该信息对如何启动您的世界打了很好的说明。
create-react-app creates a basic template for you to start learning react right away. create-react-app为您创建一个基本模板,让您立即开始学习反应。 You just need to commands,
您只需要命令,
1) npm install and, 1)npm安装,
2) npm start(which starts the server) 2)npm start(启动服务器)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.