Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Client Utility Function for Result Sets #12

@adam-rocska

Description

@adam-rocska

It's too fucking frequent that we do this:

const [mediaSet] = useMedia();
  const [media, setMedia] = useState<Array<MediaModel>>([]);
  useEffect(() => {
    if (!isResult(mediaSet)) return;
    setMedia(Array.from(mediaSet));
  }, [mediaSet]);

Using sets is a good pattern so far BUT it's inconvenient in most cases when you just directly hook the SWR live sets into your GUI.

It'd be nice to have another hook which would simply wrap the clientHook you'd use and play this given game ( ͡° ͜ʖ ͡°)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions