grommet-starter-new-app icon indicating copy to clipboard operation
grommet-starter-new-app copied to clipboard

react-dom.development.js:86 Warning: A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.

Open lylest opened this issue 2 years ago • 0 comments

i get this when trying to wrapp my code with responsiveContex

import React,{createContext} from 'react' import { Grommet,ResponsiveContext,Box } from 'grommet'; import MainNavigator from './navigation/MainNavigator' import {BrowserRouter as Router} from 'react-router-dom' import './css/main.css'

function App() { return ( <Grommet theme={theme}> <ResponsiveContext.Consumer> <Router> <MainNavigator /> </Router>

   `</ResponsiveContext.Consumer>`
`</Grommet>`

) }

export default App

lylest avatar Jun 25 '22 05:06 lylest