How to enable file upload on React’s Material UI simple input?
The API provides component for this purpose. <Button variant=”contained” component=”label” > Upload File <input type=”file” hidden /> </Button>
The API provides component for this purpose. <Button variant=”contained” component=”label” > Upload File <input type=”file” hidden /> </Button>
You can have the onChange logic in this.handleSelectChange({ value, type: input.name }) and use change action from redux-form According to the docs: change(field:String, value:any) : Function Changes the value of a field in the Redux store. This is a bound action creator, so it returns nothing. Code: import { change } from “redux-form”; handleSelectChange = … Read more
Your redux action creators must be plain, object and should dispatch and action with a mandatory key type. However using custom middlewares like redux-thunk you could call axios request within your action creators as without custom middlewares your action creators need to return plain object Your action creator will look like export function create (values) … Read more