React

Set react state dynamically in typescript

09/10/2020 21:15
Set react state dynamically in typescript   1. define interface for state and state keys 2. use dynSetState method in handleChange handler   export interface IMasterFormState {     currentStep: number;     email?: string | null | undefined;  ...

Run powershell script in react on build action in package.json

09/10/2020 12:45
Here is an example which creates copy of index.html file from build folder (created by npm run build from index.html in public folder) and replaces server paths to enable open file in browser from file system. After running npm run build, postbuild action is called, our powershell is executed...