1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend
olav fee1894c34 refactor: port global settings to TS/hooks (#679)
* refactor: add ref support to PermissionSwitch

* refactor: port global settings to TS/hooks

* refactor: fix file extension

* refactor: format file

* refactor: fix inconsistent locationSettings prop

* refactor: use correct locationSettings hook

* refactor: use objects for settings hooks
2022-02-08 13:36:32 +01:00
..
.github/workflows
cypress
public
src refactor: port global settings to TS/hooks (#679) 2022-02-08 13:36:32 +01:00
.editorconfig add editorconfig 2016-12-05 23:08:32 +01:00
.gitignore
.nvmrc
.prettierignore
.prettierrc
CHANGELOG.md
craco.config.js
cypress.json
index.js
LICENSE fix: license year to 2020 2020-05-12 22:40:05 +02:00
package.json
README.md
renovate.json
tsconfig.json
typings.json
vercel.json
yarn.lock refactor: port FeatureToggleList to TS/SWR (#663) 2022-02-08 12:06:25 +01:00

Developing

Why did you render

This application is set up with WDYR and craco in order to find, debug and remove uneccesary re-renders. This configuration can be found in /src/wdyr.ts.

In order to turn it on, change the configuration accordingly:

if (process.env.NODE_ENV === 'development') {
    const whyDidYouRender = require('@welldone-software/why-did-you-render');
    whyDidYouRender(React, {
        trackAllPureComponents: true,
    });
}

Now you should be able to review rendering information in the console. If you do utilise this functionality, please remember to set the configuration back to spare other developers the noise in the console.

Run with a local instance of the unleash-api:

You need to first start the unleash-api on port 4242 before you can start working on unleash-frontend. Start webpack-dev-server with hot-reload:

cd ~/unleash-frontend
yarn install
yarn run start

Run with a heroku-hosted unleash-api:

cd ~/unleash-frontend
yarn install
yarn run start:heroku

UI Framework

We are using material-ui.

Happy coding!