Skip to content

Add test for props and state melding, and improve implementation #5

@js-jslog

Description

@js-jslog

https://github.com/js-jslog/harpguru/blob/0bbad2f1aa94c781aac187e256236a698d4790be/src/HarpFace/HoleInteraction/components/index.tsx#L20

The above line solved the problem that during the call to HoleInteraction following props changes, the useState function call setting a degreeId as the initial state is not equivalent to calling setValueToDisplay so the component doesn't appear to rerender.

I need to find a way to test this and a way to solve the problem properly. I don't think the documented use of useEffect is for this purpose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions