Skip to content

Instantly share code, notes, and snippets.

@udittyagi
Last active October 15, 2019 15:39
Show Gist options
  • Save udittyagi/333258a143faa57c18d96dea38f2a8b3 to your computer and use it in GitHub Desktop.
Save udittyagi/333258a143faa57c18d96dea38f2a8b3 to your computer and use it in GitHub Desktop.
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import {BreakpointProvider} from './breakpoint'
const queries = {
xs: '(max-width: 320px)',
sm: '(max-width: 720px)',
md: '(max-width: 1024px)',
or: '(orientation: portrait)', // we can check orientation also
}
ReactDOM.render(
<BreakpointProvider queries={queries}>
<App />
</BreakpointProvider>, document.getElementById('root'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment