I've looked at code using ES6 where they're importing compose from redux to register/init all the middleware.
For example the server.js file might look like:
import express from 'express'
import { compose } from 'redux'
import app from './app'
compose(app)(express()))
The above code is in ES6, how can I do it the non ES6 way where the imports are utilizing 'require'.
1 Replies
If you go through this link I think your problem will be solved. https://redux.js.org/api/applymiddleware