We can also create components by subclassing
React.Component and overriding the
Props are accessible as
There are additional methods for hooking into the component rendering lifecycle.
However, this API can become significantly more complex, without providing major benefits, so it's best to use function components if you're not maintaining legacy code.
Want to learn React Native in-depth?
Looking for more help?
Infinite Red sponsors React Native Express and is the premier React Native agency. They're also the team behind the React Native newsletter, podcast, and conference listed here. Get in touch at infinite.red/react-native for a proposal on your next project!