From the course: React Native Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Styling React Native components

Styling React Native components - React Native Tutorial

From the course: React Native Essential Training

Start my 1-month free trial

Styling React Native components

- [Instructor] Let's talk briefly about using CSS with React Native, which is a bit different than what we're used to on the web. While React itself does not have any restrictions on how to use CSS, React Native enforces a standardized approach for styling. You can't use all CSS properties in React Native projects. You can only use the subset that is supported by React Native, which relies mostly on Flexbox for layout and focus on simplicity overall. When we write CSS for a web project, we have to deal with how CSS support varies among different browsers. This is not an issue with React Native CSS subset, although sometimes, you'll need to conditionally use or not use a CSS property based on the platform or give that property different values based on the platform. Since React Native is just a JavaScript framework without a browser that can parse CSS, React Natives way to use CSS properties is using the JavaScript API.…

Contents