Skip to content

useMap and useSet don't trigger component render after adding an even amount of items #90

Closed
@AlexKrupko

Description

@AlexKrupko

Hi there,
useMap and useSet hooks don't trigger component render after adding an even amount of items.
You can find a code example here - https://codesandbox.io/s/unruffled-flower-kh57rp?file=/src/App.js
This happens because of using boolean value in the useForceUpdate hook which is used to trigger rendering in both useMap and useSet.

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