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

Failed prop type: Invalid prop children of type object supplied to MenuItem, expected string. #48

Closed
devahmadbarham opened this issue Dec 8, 2018 · 1 comment

Comments

@devahmadbarham
Copy link

Failed prop type: Invalid prop children of type object supplied to MenuItem, expected string.
i was try to get item from array but i have this error
code
render {
let citymenu = this.state.city.map((val, key) => {
return <MenuItem key={key} onPress={()=> {this.state.cityselectname=val.name; }}><Text style={{color:'white'}}> {val.name} });

return {

{this.state.cityselectname || "select city"} } > {citymenu}

}}

@mxck
Copy link
Owner

mxck commented Dec 9, 2018

@devahmadbarham hi! Please send formatted code. :) Also check textStyle prop. You don't need pass text component to MenuItem

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

2 participants