It seems that <TouchableHighlight>
must have exactly one child. The docs say that it supports only one child and more than one must be wrapped in a <View>
, but not that it must have at least (and most) one child. I just wanted to have a plain coloured button with no text/image, so I didn’t deem it necessary to add a child.
I’ll try to update the docs to indicate this.
Related Posts:
- SyntaxError: Adjacent JSX elements must be wrapped in an enclosing tag
- Reactjs – Form input validation
- Error Running React Native App From Terminal (iOS)
- ‘react-scripts’ is not recognized as an internal or external command
- After $npm install, Getting Error: Cannot find module ‘../lib/utils/unsupported.js’
- React Native: this.setState is not a function
- What is prevState in ReactJS? [duplicate]
- Failed to compile. Module not found: Can’t resolve ‘react-router-dom’
- How to clear react-native cache?
- how to use react require syntax?
- ReactJS: Maximum update depth exceeded error
- How to make a discord bot create an invite for every server it joins?
- map function for objects (instead of arrays)
- Start script missing error when running npm start
- What is the difference between React Native and React?
- Invariant Violation: Objects are not valid as a React child
- Invariant Violation: Objects are not valid as a React child
- “SyntaxError: Unexpected token < in JSON at position 0"
- What is Virtual DOM?
- How can a Discord bot create a hyperlink in a Discord message in an embed or in general? [closed]
- How to you store data for each discord user in the discord server?
- Babel 6 regeneratorRuntime is not defined
- How to use Redirect in the new react-router-dom of Reactjs
- TypeError: Converting circular structure to JSON in nodejs
- React.js: Set innerHTML vs dangerouslySetInnerHTML
- Babel 7 – ReferenceError: regeneratorRuntime is not defined
- React – uncaught TypeError: Cannot read property ‘setState’ of undefined
- How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
- Understanding unique keys for array children in React.js
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- How to do a redirect to another route with react-router?
- Jest spy on functionality
- Difference between npx and npm?
- Client on Node.js: Uncaught ReferenceError: require is not defined
- Error: Can’t set headers after they are sent to the client
- How can a Discord bot create a hyperlink in a Discord message in an embed or in general?
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- require is not defined? Node.js
- Client on Node.js: Uncaught ReferenceError: require is not defined
- Error: Can’t set headers after they are sent to the client
- TypeError: Router.use() requires middleware function but got a Object
- Express error – TypeError: Router.use() requires middleware function but got a Object
- Cannot GET / Nodejs Error
- What is NODE_ENV and how to use it in Express?
- Node.js heap out of memory
- await is only valid in async function
- TypeScript React.FC
confusion - How to set NODE_ENV to production/development in OS X
- await is only valid in async function
- Heroku: “No default language could be detected for this app” error thrown for node app
- Heroku: “No default language could be detected for this app” error thrown for node app
- Axios Delete request with body and headers?
- Loop inside React JSX
- Can’t resolve module (not found) in React.js
- TypeError: Router.use() requires middleware function but got a Object
- What does “res.render” do, and what does the html file look like?
- How to obtain username from Promise
? - How to implement navbar using react
- NPM ELIFECYCLE error – using node server.js command
- Loop inside React JSX
- Understanding React-Redux and mapStateToProps()
- how to render a react component using ReactDOM Render
- React this.setState is not a function
- Node.js – SyntaxError: Unexpected token import
- Console logging for react?
- Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag
- ReferenceError: fetch is not defined
- Node.js – SyntaxError: Unexpected token import
- React: trigger onChange if input value is changing by state?
- In reactJS, how to copy text to clipboard?
- Invalid shorthand property initializer
- You should not use Route or withRouter() outside a Router when using react-router 4 and styled-component in react
- nodejs – error self signed certificate in certificate chain
- React-Router only one child
- What does the className attribute mean in JSX?
- React with ES7: Uncaught TypeError: Cannot read property ‘state’ of undefined
- What’s the source of Error: getaddrinfo EAI_AGAIN?
- React Hook Warnings for async function in useEffect: useEffect function must return a cleanup function or nothing
- stop all instances of node.js server
- Using Node.js require vs. ES6 import/export
- Setting a backgroundImage With React Inline Styles
- React – TypeError: Cannot read property ‘props’ of undefined
- ReferenceError : window is not defined at object.
Node.js - Why is process.env.NODE_ENV undefined?
- Node.js Port 3000 already in use but it actually isn’t?
- What is the difference between state and props in React?
- Unable to verify leaf signature
- How to pass props to {this.props.children}
- React eslint error missing in props validation
- OnChange event using React JS for drop down
- npm – EPERM: operation not permitted on Windows
- How can I mock an ES6 module import using Jest?
- ESLint Parsing error: Unexpected token
- React Context vs React Redux, when should I use each one?
- Timers in React Native (this.setTimeout)
- Setting onSubmit in React.js
- How to import image (.svg, .png ) in a React Component
- Uncaught TypeError: Cannot read property ‘props’ of null
- AJAX response error: net::ERR_EMPTY_RESPONSE
- ReactJS: setTimeout() not working?