Gotta Catch 'Em All!
"POKEAPP" is a website to collect pokemons made in React JS with Typescript. This project is made in order to complete one of the recruitment stage of Tokopedia Indonesia.
- React JS
- Typescript
- Emotion JS
- Apollo GraphQL
- React Router
Most of the important folders and files are inside the src
folder. Inside, you will find 4 files:
App.tsx
index.tsx
routes.tsx
styles.ts
App.tsx
is the root file where all the components are placed. routes.tsx
is where the routes are placed, and styles.ts
is the file for global styles.
Aside from the files, you will also find 4 folders:
components
interfaces
pages
queries
All of the pages are stored in pages
. Inside, there is an index.ts
file where all the pages are exported to make importing pages easier in other components. interfaces
folder contains all the typescript types needed for this project, and components
folder is where the components are placed. Each component has its' own test inside the __test__
folder. Last, all the queries needed to make request with GraphQL are located in queries
folder.
This project is deployed to github pages and can be accessed here. The workflow consists of 4 steps:
Install Dependencies
Run Test
Run ESLint
Build Project
Deploy Project
To deploy the project, I am using JamesIves's Github Pages Deploy Action.
In order to start the app in development mode, you can run this syntax in the project directory:
By default, the app will open in http://localhost:3000. The page also has hot reload, which means that it will refresh if you make any edits.
If you want to build the app for production, you can run this syntax in the project directory:
This will bundle the React in production mode and optimizes the build for the best performance.
The build is then minified and the app is ready to be deployed!