O'Reilly logo

React and React Native - Second Edition by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The App component

The App component includes the page heading and a list of links to various article categories. When the user moves around the user interface, the App component is always rendered, but each <Route> element renders different content based on the current route. Let's take a look at the component, and then we'll break down how it works:

import React from 'react';import {  BrowserRouter as Router,  Route,  NavLink} from 'react-router-dom';import { connect } from 'react-redux';// Components that render application state.import Home from './Home';import Article from './Article';// Higher order component for making the// various article section components out of// the "Home" component. The only difference// is the "filter" property. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required