Welcome to this React-Vite-Typescript-Tailwind-Mui-Material-TanStack Router and Query landing page (yes, a mouthful).
Clone the Repository
git clone https://github.com/Junotas/React-Vite-TS-Tailwind-StartPage.git
Remove Existing Git History If you want to start with a clean Git history (recommended if you plan to push to your own repository), run:
cd React-Vite-TS-Tailwind-StartPage
rm -rf .git
git init
Install Dependencies
npm install
Run the Development Server
npm run dev
After completing these steps, you should see the project running on http://localhost:5173
The project utilizes TanStack Router for easy, type-safe, and file-based routing:
src/routes
folder, making it easy to manage and extend routes.__root.tsx
, which includes links for Home and About.src/routes
folder, and TanStack Router will automatically pick it up as a new route after you've run npm run dev.The project leverages TanStack Query for efficient data fetching, caching, and state management:
The project uses Tailwind CSS to create a streamlined, utility-first approach for custom styling:
The project incorporates Material-UI (MUI) to provide ready-made, customizable, and accessible components:
Button
, TextField
, and Typography
are used for a polished UI.The project is configured with ESLint and Prettier for consistent code formatting and linting. To ensure these tools work seamlessly in your development environment, follow the steps below to set up your VS Code settings:
To enable automatic formatting and linting on save, update your VS Code settings:
Ctrl + ,
or navigating to File
> Preferences
> Settings
.Prettier - Code Formatter
.To confirm everything is set up correctly:
.tsx
file in the project.You can also run linting and formatting checks from the command line using the following scripts:
# Lint your code
npm run lint
# Format your code with Prettier
npm run format
This setup should ensure that ESLint and Prettier are working effectively with your VS Code environment.
index.tsx
) (Welcome page more or less the read me)about.tsx
) (Originally just to show the routing with two pages but might remove the page)list.tsx
) (Tanstack query and custom hook exemple)This project is designed to be easily extensible, so here are some ideas for future enhancements to add extra functionality and make it even more versatile: