Skip to content

Suggestion for modifying the use functions #50

@HIMISOCOOL

Description

@HIMISOCOOL

You could change this line and all similar use functions from:

useState: (map?: KnownKeys<TState>[]) => useNamespacedState(store, namespace as string, map),

To be

useState: (...map: KnownKeys<TState>[]) => useNamespacedState(store, namespace as string, map),

which would eliminate the need to explicitly pass the map in as an array:

const { loading, error } = useState('loading', 'error');

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