CSS Stuff in React Native

In this particular lesson, You will run How to use 'styled-components'.

Styled components are too important for those, whose are want to make their app nicer. It converts the app to user-friendly.

HOW TO INSTALL

npm install -s styled-components

N.B: After installing these packages, You may have to restart the Code Editor.

HOW TO IMPORT THIS COMPONENT

import styled from 'styled-components'

HOW TO USE THIS COMPONENT

To use this component, You have to follow a few processes:

  • Choose a Name of your NEW Component/ Custom Component. Here I choose "Container". "Container" will work as a component like "View". We can customize the component to our needs.

  • To make a feature of the container below the return function. You must call the ''styled. '' function and mention what it is like to work to make this feature. As I said earlier, This "Container" will act like a "View" component, that's why I called the styled. function with View (Styled.View). You also have to use `` to contain all features.

Through this process, You can make your custom components with a unique style