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
- map function for objects (instead of arrays)
- Invariant Violation: Objects are not valid as a React child
- Invariant Violation: Objects are not valid as a React child
- How to use Redirect in the new react-router-dom of Reactjs
- TypeError: Converting circular structure to JSON in nodejs
- Babel 7 – ReferenceError: regeneratorRuntime is not defined
- 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
- Difference between npx and npm?
- Client on Node.js: Uncaught ReferenceError: require is not defined
- How can a Discord bot create a hyperlink in a Discord message in an embed or in general?
- 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
- Loop inside React JSX
- Can’t resolve module (not found) in React.js
- TypeError: Router.use() requires middleware function but got a Object
- how to render a react component using ReactDOM Render
- Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag
- ReferenceError: fetch is not defined
- In reactJS, how to copy text to clipboard?
- Invalid shorthand property initializer
- nodejs – error self signed certificate in certificate chain
- 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?
- Setting a backgroundImage With React Inline Styles
- React – TypeError: Cannot read property ‘props’ of undefined
- Why is process.env.NODE_ENV undefined?
- What is the difference between state and props in React?
- How to pass props to {this.props.children}
- OnChange event using React JS for drop down
- 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)
- How to import image (.svg, .png ) in a React Component
- Uncaught TypeError: Cannot read property ‘props’ of null
- Express Render not working return error: No default engine was specified and no extension was provided
- How to use npm jquery module?
- Node.js Error: connect ECONNREFUSED
- React Error: Target Container is not a DOM Element
- SyntaxError: Cannot use import statement outside a module
- How to handle ETIMEDOUT error?
- How to determine the installed webpack version
- node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]
- XMLHttpRequest module not defined/found
- How to handle the `onKeyPress` event in ReactJS?
- Expressjs / Node.js – res.redirect() not loading page
- Using async/await with a forEach loop
- Cannot read property ‘bind’ of undefined. React.js
- Why is my asynchronous function returning Promise {
} instead of a value? - NodeJs : TypeError: require(…) is not a function
- What does “export default” do in JSX?
- Basic Ajax send/receive with node.js
- Cannot find module ‘internal/fs’ after upgrading to node 7
- Uncaught Invariant Violation: Too many re-renders. React limits the number of renders to prevent an infinite loop
- Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition which is inside StrictMode
- node-request – Getting error “SSL23_GET_SERVER_HELLO:unknown protocol”
- React.js – Can’t read property of undefined
- module.exports “Module is not defined”
- Pass react component as props
- Objects are not valid as a React child. If you meant to render a collection of children, use an array instead
- How to fix Cannot find module ‘typescript’ in Angular 4?
- Error: ENOENT: no such file or directory, stat ‘/public/main.html’ at Error (native)
- npm WARN enoent ENOENT: no such file or directory, open ‘C:\Users\Nuwanst\package.json’
- SyntaxError: expected expression, got ‘<'
- React-Router : What is the purpose of IndexRoute?
- e.target.value on an input field ReactJs, how does it work?
- command not found: jest
- SyntaxError: Use of const in strict mode
- NPM install fails with node-gyp
- ReactJS – .JS vs .JSX
- How to fix Error: listen EADDRINUSE while using NodeJS?
- React, Uncaught ReferenceError: ReactDOM is not defined
- How to allow CORS in react.js?
- How to format a UTC date as a `YYYY-MM-DD hh:mm:ss` string using NodeJS?
- Invariant Violation: _registerComponent(…): Target container is not a DOM element
- How to disable auto-start of “Node.js: Server-side JavaScript” when using Adobe Dreamweaver?
- How to disable button in React.js
- What does “export default” do in JSX?
- Write / add data in JSON file using Node.js
- Make Discord bot send picture with message with NodeJS
- where is create-react-app webpack config and files?
- What does `node –harmony` do?
- Must use destructuring props assignment
- Getting “Cannot call a class as a function” in my React Project
- Error: Couldn’t find preset “es2015” relative to directory “/Users/username”
- Using Angular 2 without TypeScript Transpiler