NA +91-8727899942 thecoderjob@gmail.com

CHAPTER - 10

what is props in react native?

 

In React Native, props (short for "properties") are used to pass data from a parent component to a child component. Props allow you to customize the behavior and appearance of your components.

Here's is the Code !!

const Greeting = (props) => {
  return (
    <View>
      <Text>Hello, {props.firstName} {props.lastName}!</Text>
    </View>
  );
};

const App = () => {
  const person = {
    firstName: 'John',
    lastName: 'Doe',
  };

  return (
    <Greeting {...person} />
  );
};

Chapter 9

State in react native | State vs Variables

Previous chapter

Chapter 11

Style in React Native || what are the different style type.

Next chapter

Get In Touch

NA

thecoderjob@gmail.com

+91-8727899942

Popular Links

© www.thecoderjob.com. All Rights Reserved.               Designed by HTML Codex