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

support for atomFamily #188

Open
1 task
danosaure opened this issue Feb 26, 2024 · 1 comment
Open
1 task

support for atomFamily #188

danosaure opened this issue Feb 26, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@danosaure
Copy link

Problem

As a user, I want to be able to see atomFamily states.

Solution

The only solution for now is for me to use atom() and create the underlying structure myself. It adds complexity for setting/retrieving the values.

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd love to make a PR to implement this feature!
@danosaure danosaure added the enhancement New feature or request label Feb 26, 2024
@danosaure
Copy link
Author

After multiple restart of the app and chrome dev tools itself, it now appears. But it has double-quotes in the name. Is that expected?
image

export const inProgressState = atomFamily<boolean, string>({
  key: "inProgress",
  default: (id) => defaultById(id),
});

// ...
const [inProgress, setInProgress] = useRecoilState(inProgressState("userPreferences"));

// ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant