Skip to content

Zustand version #102

@DavoCg

Description

@DavoCg

Hello,

This package is using an old zustand version and this message [DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use import { useStore } from 'zustand'.

Would you consider upgrading to last zustand version and using import { createStore } from "zustand" instead of import create from "zustand/vanilla";

Instead of

export default function createStore() {
  return create<FeedStoreState>((set) => ({

It would like

export default function createFeedStore() {
  return createStore<FeedStoreState>()((set) => ({

I consumer land it would be used like:

import { useStore } from "zustand";

const count = useStore(feed.store, (state) => state.metadata.unseen_count);

This modification would require some changes in feed code,

Happy to submit a PR if you consider it and don't hesitate to tell me if i miss something

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions