Replace useResponsiveValue by useResponsiveProps #283
Labels
enhancement
New feature or request
needs:discussion
Further information is requested
scope:calculation
This issue relates to the calculation logic
Milestone
What:
I suggest that
useResponsiveValue
hook respected the behavior system used in responsive props. This means that a breakpoint without an explicit behavior implies the default one (i.e. "up"). Breakpoints (properties) accept an explicit behavior that changes the way their values are applied.The example above would assign the following values:
Why:
Current implementation of
useResponsiveValue
treats all properties as with "only" behavior. This makes it hard for a value to persist between breakpoints and requires to repeat it.Using the second parameter of
defaultValue
doesn't help, because it's assign on any matches outside of the given breakpoint names. It's generally meant for a different behavior.The text was updated successfully, but these errors were encountered: