Skip to content

[WIP] Native React CRA #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ app.env
src/theme/semantic/

devSrvProxy.json
docker-compose.yml

docker-compose.yml
32 changes: 22 additions & 10 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# react-semantic-ui-skeleton
React + Redux + Semantic UI Skeleton

Based on [wmonk/create-react-app-typescript](https://github.com/wmonk/create-react-app-typescript) but it's ejected for customization.
React + Redux + Semantic UI Skeleton with Typescript

Based on [Create React App](https://github.com/facebook/create-react-app).

This application uses [semantic ui themes](https://semantic-ui.com/usage/theming.html). Take a look at the `semantic` folder.
**Note:** We have to copy the themes from the nodes_modules package `semantic-ui` to `semantic` manually after updates to get the latest assets.
Expand All @@ -11,17 +12,13 @@ After you have copied these sources to your project you may want to change some
This is a list of files which contains default values.

- `app.env.dist`: url
- `config/webpack.config.dev.js`: `publicPath` and `publicUrl` settings
- `config/webpack.config.prod.js`: URL pattern for service worker
- `config/webpackDevServer.config.js`: `public` and `allowedHosts` settings
- `package.json`: change name
- `package.json`: change name, configure [proxy](https://facebook.github.io/create-react-app/docs/proxying-api-requests-in-development) for dev
- `public/index.html`: change title
- `public/manifest.json`: change name
- `src/api/ConfiguredAxios.ts`: base API url
- `src/notify.tsx`: change logo
- `src/reducer.ts`: add your reducers
- `src/registerServiceWorker.ts`: notification text
- `devSrvProxy.json.dist`: Proxy config for dev server
- `src/serviceWorker.ts`: notification text
- `docker-compose.yml.dist`: Docker Dev Env (f.e. join backend network)

## Frontend build
Expand All @@ -37,9 +34,9 @@ We have a two stage build.
You have to manually install the dependencies and to compile the semantic ui theme.

```bash
docker run --rm --env-file=app.env.dist -i -v $(pwd):/app sandrokeil/typescript yarn install
docker run --rm -i -v $(pwd):/app sandrokeil/typescript yarn install

docker run --rm --env-file=app.env.dist -i -p 4000 -p 3000 -v $(pwd):/app sandrokeil/typescript yarn run semantic
docker run --rm -i -v $(pwd):/app sandrokeil/typescript yarn run semantic
```

Now you can start the development server and open [http://localhost:3000/](http://localhost:3000/) in your favourite browser.
Expand All @@ -58,7 +55,22 @@ docker run --rm --env-file=app.env.dist -i -v $(pwd):/app sandrokeil/typescript
docker run --rm --env-file=app.env.dist -i -v $(pwd):/app sandrokeil/typescript yarn run build
```

## Links

- [Feature like module structure](https://www.robinwieruch.de/tips-to-learn-react-redux/#folderOrganization)
- [Redux 4 + TypeScript: A type-safe approach](https://resir014.xyz/posts/2018/07/06/redux-4-plus-typescript/)
- [A Strongly-Typed Redux Action Pattern for TypeScript 2.4+](https://spin.atomicobject.com/2017/07/24/redux-action-pattern-typescript/)
- [Turning Requirements into React/Redux Code](https://decembersoft.com/posts/turning-requirements-into-react-redux-code/)
- [Higher Order Components (HOCs)](https://medium.com/@franleplant/react-higher-order-components-in-depth-cf9032ee6c3e)
- [Use a Render Prop!](https://cdb.reacttraining.com/use-a-render-prop-50de598f11ce)
- [React is Slow, React is Fast](https://marmelab.com/blog/2017/02/06/react-is-slow-react-is-fast.html)
- [Curated tutorial and resource links for React / Redux](https://github.com/markerikson/react-redux-links)

## Browser extensions

- Install [redux-devtools-extension](https://github.com/zalmoxisus/redux-devtools-extension)
- Install [react-extension](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)

## TODO

- The package [`recompose`](https://github.com/acdlite/recompose) is deprecated in favour of React Hooks, but it's not released yet.
93 changes: 0 additions & 93 deletions config/env.js

This file was deleted.

14 changes: 0 additions & 14 deletions config/jest/cssTransform.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/jest/fileTransform.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/jest/typescriptTransform.js

This file was deleted.

57 changes: 0 additions & 57 deletions config/paths.js

This file was deleted.

16 changes: 0 additions & 16 deletions config/polyfills.js

This file was deleted.

Loading