cometkim / use-pulled-grid

A React hook provides responsive grid container style
MIT License
5 stars 0 forks source link

Style objects should be immutable #12

Closed cometkim closed 3 years ago

cometkim commented 5 years ago

Class names are changed in the styled-component example (live demo).

This is weird behavior because Hooks would shallow compare all entries of the second argument in and triggered by its result.

If there is an inevitable reason for the style to update even though the result is the same, the hook should return an immutable object for ease of use.