Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #27

Open
lylest opened this issue Jun 25, 2022 · 0 comments

Comments

@lylest
Copy link

lylest commented Jun 25, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant