- Notifications
You must be signed in to change notification settings - Fork7
A higher-order react component enabling container queries today
License
NotificationsYou must be signed in to change notification settings
VinSpee/react-container-query-container
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
npm i -D react-container-query-container- initialize thecontainer queriesprolyfillonce in the top of your app. (set
postcss: trueif you're using thepostcss-plugin):import ContainerQueryContainer, { cq } from 'react-container-query-container';const cqAPI = cq({ postcss: true }); - decorate your component with the higher-order component, passing an optionalcallback to execute when the component is reevaluated:
@ContainerQueryContainer({cqAPI,componentShouldReevaluate: () => console.log('reevaluated.'),})class DemoComponent extends Component { …
Welcome to the future!
Collaborating on this React component:
You will need the following things properly installed on your computer.
git clone https://github.com/VinSpee/react-container-query-container.gitthis repository- change into the new directory
npm install
nwb servewill run the component's demo app- Visit the demo athttp://localhost:3000
nwb testwill run the tests oncenwb test --serverwill run the tests on every change
nwb build
About
A higher-order react component enabling container queries today
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.