Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imduchuyyy/code-base-react-restful
https://github.com/imduchuyyy/code-base-react-restful
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/imduchuyyy/code-base-react-restful
- Owner: imduchuyyy
- License: gpl-3.0
- Created: 2020-08-18T04:22:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T06:35:34.000Z (over 4 years ago)
- Last Synced: 2024-11-13T08:42:49.718Z (2 months ago)
- Language: JavaScript
- Homepage: https://code-base-react-restful.vercel.app
- Size: 697 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code Base Front-end React, Webpack, Babel, Eslint using with RESTful api
## Setting:
1. Connect to Backend
- Setting in 2 file `.env.development.local` and `.env.production.local`
2. Setting router
- Setting in `src/configs/routers/index.js`
3. Setting Provider
- Setting in `src/utils/provider/index.js`## Usage:
1. Running with command:
- Start
> npm run start
- Build
> npm run build2. Using alias
- Đối với các thư mục cấp 0 từ `src`, vui lòng tạo file `index.js` để `export` các component ở trong thư mục cấp 0 đó.
- Sau khi `export` các bạn có thể `import` theo cách sau.```javascript
import { ... } from '@components'
import { ... } from '@contexts'
import { ... } from '@environments'
import { ... } from '@helpers'
import { ... } from '@hooks'
import { ... } from '@layouts'
import { ... } from '@pages'
import { ... } from '@translation'
```3. Support Dynamic Import
```javascript
import('@pages/login').then(({ default: Component }) => {
return
})
```4. Support i18next
- Edit folder `resource` in folder `src/translation` to translate
5. Support eslint