import React from 'react';
import { Route } from 'react-router-dom';

const RenderRoute = ({ Component: ComponentToRender, ...rest }) => (
  <Route
    {...rest}
    render={props => <ComponentToRender {...props} />}
  />
);

export default RenderRoute;