Hello! this is my first post on dev.to. i hope y'all understand to my tutorial. how to install react on termux android. ππ
1. Update your packages in termux
First, you need to update the packages in termux. here is the command how to update the packages :
pkg update && pkg upgrade -y
2. Install nodejs in termux
Next, you need to install nodejs in termux :
pkg install nodejs -y
3. Create your react app
You need to create app here is the command looks like :
npx create-react-app <your-project-name>
cd <your-project-name>
e.g
npx create-react-app react-app
cd react-app
4. Install tailwind css
You need to install tailwind with npm here is the command :
npm install -D tailwindcss
npx tailwindcss init
5. Edit configuration tailwind css
You need configuration tailwind css for react in tailwind.config.js
file. you can use nano or vim to open the file configuration.
If you don't have nano in termux you need to install it
pkg install nano -y
now you can use nano like this :
nano <your-file-name>
so, we comeback to the topic we open the file configuration in termux with text editor like this :
nano tailwind.config.js
edit inside file or replace the text with this :
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
after that save the file in nano with ctrl + x, y, enter
6. Add @tailwindcss
in file css
open the file index.css in folder ./src/index.css
with nano like this :
nano ./src/index.css
add @tailwindcss
at top of the line file
@tailwind base;
@tailwind components;
@tailwind utilities;
Now you can run the react app with tailwind in termux :). you can run the react app with :
npm run dev
or
npm run start
that is my tutorial i hope you all understand with my tutorial hehe. because is my first post you can support me i will post the tutorial next time haha.
Source :
Top comments (0)