Recoilize icon indicating copy to clipboard operation
Recoilize copied to clipboard

support for atomFamily

Open danosaure opened this issue 1 year ago โ€ข 1 comments

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 avatar Feb 26 '24 17:02 danosaure

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"));

// ...

danosaure avatar Feb 27 '24 04:02 danosaure