-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
👋 Hello! I suspect that redux
may need to be a peerDependency
, but first I'll describe the issue I see:
$ yarn list redux
yarn list v1.19.0
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ redux-starter-kit@0.5.1
│ └─ redux@4.0.1
└─ redux@4.0.4
✨ Done in 0.82s.
I have two copies of redux
in my tree, and redux-starter-kit
is being supplied its own version.
Why do I depend on redux
if I use redux-starter-kit
? Well, some of my hooks do stuff like:
const dispatch = useDispatch();
const actions = useMemo(() =>
bindActionCreators({ fooAction, barAction }, dispatch),
[dispatch]
);
So they use bindActionCreators
, which is exported from redux
and not redux-starter-kit
.
Regardless of this, I suspect that redux
may need to be a peerDependency
anyway, because other things declare it as a peerDependency
, and if you rely on it to be supplied by redux-starter-kit
then you have no guarantee what version you will get – it's not guaranteed that redux-starter-kit
's version will be the one hoisted to the top of the node_modules
tree.
Metadata
Metadata
Assignees
Labels
No labels