-
-
Notifications
You must be signed in to change notification settings - Fork 33
Description
When:
This issue came up in a react-static setup.
- clone this repository
- run the website with
yarn start
- run cypress with
yarn cypress open
- run the
hook-components.js
test (near the bottom of the list) - the tests for BreakpointNumbers should fail
Current behavior:
BreakpointNumber, which uses useResponsiveValue, is always falling back to the default value of 0. It never uses the intended custom breakpoints names and values.
createWithBreakpoints
is logging a warning in the console, saying that the custom breakpoint names are not found, and listing the default breakpoints as being available.
Expected behavior:
BreakpointNumber should show 0 on small
screens, 1 on medium
screens, 2 on large
screens
Environment:
- node version:
14.15.4
- npm version:
7.6.0
- atomic-layout version:
^0.16.2
Current Pointers:
Console logging inside of the Layout.configure
and createWithBreakpoints
functions have shown that createWithBreakpoints
is being called before Layout.configure
, therefore it uses the default breakpoints. After Layout.configure
is called, createWithBreakpoints
and useResponsiveValue
do not receive the latest breakpoint objects.