Write Styling for the particular component in that components same .js file.

Header.js file

// Import libraries for making a component
import React from 'react';
import { Text } from 'react-native';

// Make a component
const Header = () => {

const {textStyle, viewStyle} = styles; //add all styles here
  return (
    ‹View style = {viewStyle} 
      ‹Text style = {textStyle} Header Text ‹/Text› 

const styles = {
viewStyle : {
    backgroundColor : '#f0f0f0'
textStyle : {
  fontSize : 20

// Make the component available to other parts of the app
export default Header;


Hope you find this blog useful. Please feel free to contact with me in case you have any query, suggestions.  You can comment, like and follow posts.

You can request any topic related to Swift, React native and iOS development.