Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I flag some properties in initial state for useImmerReducer as private or with any other modifier #1146

Open
yasinitskyi opened this issue Sep 30, 2024 · 0 comments
Labels

Comments

@yasinitskyi
Copy link

🙋‍♂ Question

How do I flag with modifier some of my properties in initial state for useImmerReducer without getting error. If I delete flag everything works, but I don't want to see some of properties appear in autocomplete while trying to access state from useImmerReducer:

Here is my model for useImmerReducer initial state:
image

Here is my reducer:
image

Here is error I am getting:
image

Environment

Vite React

  • Immer version:
    "immer": "^10.1.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "use-immer": "^0.10.0",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant