DEV Community

Cover image for Build React and Next applications most fast and efficiently
Alexis Guzman
Alexis Guzman

Posted on • Updated on

 

Build React and Next applications most fast and efficiently

Hello, world. Usually, developers spent a lot of time installing dependencies, creating folders, etc, before having our initial configuration and start working on the application.

The goal of ReexJs CLI is that we can start working on our application without worrying about the initial configuration.

With ReexJs we can:

  • Create a react.js or next.js app.
  • Create folders with a list of predefined lists and add custom folders.
  • Create routes if your choose react or pages for next.
  • Install normal dependencies and dev dependencies.

Requirements

  • Node Js
  • An active internet connection for CLI to work.

How it works

ReexJs use npx create-react-app <appname> or npx create-next-app <appname> and spawn from child_process to run one of the two commands.

To create the folders use mkdirSync from fs, and depending on if you previously choose react.js or next.js folders will be created in different paths, for react.js these will be created in src/, and for next.js folder will be created in the root path /.

Finally to install the dependencies spawn is also used when installing the framework. npm i <dependencies> for normal dependencies and npm i -D <devDependencies>.

How to use it

  1. Install ReexJs
    • Npm: npx reexjs-cli
    • Yarn: yarn reexjs-cli
  2. Choose the app name. By default is reexjs-app.
  3. Choose the framework between react.js and next.js.
  4. Select predefined folders and add custom folders.
  5. Write your normal dependencies and dev dependencies.
  6. Finally change the directory and run npm start or npm run dev.

intro

Conclusion

ReexJs can save us time and start working on our application without worrying about the initial configuration.

So take a ☕ and relax.



Thank you for reading 🙏
If you enjoyed this article or found it helpful, give it a thumbs-up 👍, and if you have an idea to improve the application or any type of suggestion please leave it below in the comments 💬.

Feel free to connect 👋
Buy Me A Coffee

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git