If you’re using React Native, you can use the array notation:
<View style={[styles.base, styles.background]} />
Check out my detailed blog post about this.
More Related Contents:
- How to pass data from child component to its parent in ReactJS?
- What’s the difference between “super()” and “super(props)” in React when using es6 classes?
- What is the best way to access redux store outside a react component?
- Programmatically navigating in React-Router v4
- Dynamically Add Images React Webpack
- Can I dispatch an action in reducer?
- How to implement pagination in React
- class vs className in React 16
- React Uncaught ReferenceError: process is not defined
- What is withRouter for in react-router-dom?
- How do I access refs of a child component in the parent component
- React onClick and preventDefault() link refresh/redirect?
- Axios get in url works but with second parameter as object it doesn’t
- How to tell webpack dev server to serve index.html for any route
- How to debug react native apps in visual studio code?
- How to use Google fonts in React.js?
- Importing images in TypeScript React – “Cannot find module”
- How do I convert a string to jsx?
- Persistent navigation in a NextJs _app
- react app showing empty page when redirecting on production build
- Jest setup “SyntaxError: Unexpected token export”
- React functions inside render()
- How to nest routes in React Router v4?
- create-react-app: how to use https instead of http?
- Disable ESLint that create-react-app provides
- Webpack & Typescript image import
- How to import a .txt file from my source?
- How to listen to localstorage value changes in react?
- Put A Warning If Page Refresh in ReactJS
- React Router V6 – Error: useRoutes() may be used only in the context of a component