redux-mock-store icon indicating copy to clipboard operation
redux-mock-store copied to clipboard

Documentation error/confusion: `const {configureStore}` vs `import configureStore`

Open jayands opened this issue 6 years ago • 1 comments

I mean, it could be that you are indeed exporting both, but it'd be a lot less confusing if you exported one instead and the documentation reflected that.

import { configureStore } from 'redux-mock-store' //ES6 modules
const { configureStore } = require('redux-mock-store') //CommonJS
/* or */
import configureStore from 'redux-mock-store' //ES6 modules
const configureStore = require('redux-mock-store') //CommonJS

jayands avatar Jun 27 '18 18:06 jayands

I cleaned this up in my TypeScript fork with a circular default prop. See the relevant tests.

See also: https://github.com/dmitry-zaets/redux-mock-store/issues/148#issuecomment-510758916

jednano avatar Jul 12 '19 06:07 jednano