Skip to main content

Setup Environment

Let get your project ready within 1m!? 😱

1 - JS Runtime & Toolkit - bun.sh

Install bun, docs

curl -fsSL https://bun.sh/install | bash # for macOS, Linux, and WSL

Update Zsh profile or restart terminal:

source ~/.zshrc

Verify bun is installed successfully

bun -v
# 1.0.11

2 - Project setup using bun create

Setup react project using vite

bun create vite YOUR_PROJECT_NAME
Notes
  • Replace YOUR_PROJECT_NAME with your prefered name
  • Follow the instruction to select REACT --> REACT-TS

cd to your project folder:

bun install

Start your project locally:

bun run dev

Now your project is ready! ✅

3 - Install libs using bun add

  1. Tanstack Query - v5
  2. React Router - v6
  3. Axios - v1.6
  4. Zustand - v4.4
bun add @tanstack/react-query react-router-dom axios zustand