What is the way to write applyMiddleware in redux?

when learning redux middleware, I found that there are two ways to write applyMiddleware, but this is the only one in official documents
const store = createStore (reducer, preloadedState, applyMiddleware (. Middleware)

but I saw this way of writing in other places
const store = applyMiddleware (.callilewares) (createStore) (reducer, initialState)
). I would like to ask you what kind of writing this is, the old way of writing or the old way of writing it?


these two writing methods are equivalent, the source code of createStore

export default function createStore(reducer, preloadedState, enhancer) {
  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
    enhancer = preloadedState
    preloadedState = undefined
  }

  if (typeof enhancer !== 'undefined') {
    if (typeof enhancer !== 'function') {
      throw new Error('Expected the enhancer to be a function.')
    }

    return enhancer(createStore)(reducer, preloadedState)
  }
  ...
}

the most important thing is the following line

enhancer(createStore)(reducer, preloadedState)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf576e-31f84.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf576e-31f84.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?