Welcome to the EMSI GDSC 2023/24 repository, where you can access to all workshops code and stay informed about upcoming challenging contests!
In this documentation, we'll outline the steps to create a React application using React Vite as the build tool. Additionally, we'll install and configure the following dependencies:
- Tailwind CSS
- Flowbite
- React Router DOM
- React Icons
-
Ensure that you have Node.js installed on your system. You can download it from here: https://nodejs.org/en/download
-
Open your terminal or command prompt
-
Create a new React Vite project by running
npm create vite@latest project-name -- --template react
-
Navigate into your project directiory and install the node modules
cd project-name npm install
-
Install Tailwind CSS:
npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p
Configure the template paths inside the
tailwind.config.js
file:module.exports = { content: [ './src/**/*.{js,jsx,ts,tsx}', ], theme: { extend: {}, }, plugins: [], }
Set up the Tailwind directives inside the
./src/index.css
file:@tailwind base; @tailwind components; @tailwind utilities;
-
Install Flowbite (optional):
npm install flowbite flowbite-react
Require Flowbite as a plugin inside your
tailwind.config.js
file:module.exports = { plugins: [ require('flowbite/plugin') ] }
Additionally, add the Flowbite source paths to apply the classes from the interactive elements in the
tailwind.config.js
file:module.exports = { content: [ // ... 'node_modules/flowbite-react/lib/esm/**/*.js' ] }
-
Install React Router DOM:
npm install react-router-dom
-
Install React Icons:
npm install react-icons
-
Run the app:
npm run dev
If you encounter any challenges or have questions along the way, don't hesitate to reach out.
As for providing links to resources, you can include links to relevant documentation or tutorials for each of the dependencies installed:
YouTube channel recommendations:
-
Open your terminal or command prompt and run the following command
git clone https://github.com/sifeddineEddr/gdsc-react-workshops.git
-
Navigate into the cloned repository and install its dependencies
cd gdsc-react-workshops npm install
-
You can now open the project on an IDE (VS Code as an example)
code .
Or run the project on localhost
npm run dev