Warning: Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.
Insteadof history.push,try using the Redirect component from react-router-dom instead.So instead of history.push('/blog');,tryreturn<Redirect to="/blog"/>