If you have read my another post about creating a ToDo app in react you are good to go; if not see this post.
You know that React App is a single page application containing only static assets. So, you only need to setup a mechanism to serve your static assets like CSS, JS, HTML, IMAGE, etc. files when clients ask for. Either you can use market leader HTTP servers like Apache, Nginx, etc or simple Express server that runs in Node.js.
It is a good practice to follow community standards while developing softwares. It has some major pros like
- Its easier to understand and debug/maintain software
- quicker to get help when needed from community
- It will lower development cost [Money and Time]
We will be taking the convention used by this project into consideration. react-slingshot
Make a dir called ‘todo‘ and initialize a node.js app. Continue reading
My assumptions: You have prior experience of Web framework like
Ruby on Rails, Django, Phoenix, etc.
Please refer to this React.js style guide for community comprehensible source code.
Hey, its not mandatory to use NPM to build applications with ReactJs; but, it will be alot easier to build, maintain, share codes using NPM. Firstly you should have NodeJs installed in your development machine.
Installation for Development Environment
$ sudo apt-get install nodejs
$ node -v
# if its says
command not found: node then try
# If it shows up, it means due no some name conflicts
# the name/command node is already taken by some binary.
# So, its get it back.
$ sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10
Probable Issues: NPM not found