Props are inputs passed to a component (read-only). State is data a component owns and can change.
Props
function Badge({ label }) {
return <Text>{label}</Text>;
}
// usage
<Badge label="New" />
State with useState
import { useState } from 'react';
function Counter() {
const [count, setCount] = useState(0);
return (
<Pressable onPress={() => setCount(count + 1)}>
<Text>Count: {count}</Text>
</Pressable>
);
}
Common mistake: Never mutate state directly (e.g.
count++). Always call the setter (setCount) so React re-renders.Summary
Props flow data down (read-only); state holds changeable data and re-renders the UI via its setter.