What is the function of the children attribute in react-router4 Route

looked at the official documentation and didn"t figure out what it is. What"s the difference between it and the render attribute of Route?

const OldSchoolMenuLink = ({ label, to, activeOnlyWhenExact }) => (
    <Route path={to} exact={activeOnlyWhenExact} children={({match}) => (
        <div className={match ? "active" : ""}>
            {match ? ">" : ""}<Link to={to}>{label}</Link>
        </div>
    )}></Route>
);

found an official explanation

Sometimes you need to render whether the path matches the location or not. In these cases, you can use the function children prop. It works exactly like render except that it gets called whether there is a match or not.

Route three ways to render components

  • component is the most commonly used. Only matching location will load component corresponding React components
  • render the route matching function calls
  • children the corresponding component is rendered regardless of whether the route matches
Menu