Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Warning: Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.

Instead of history.push, try using the Redirect component from react-router-dom instead. So instead of history.push('/blog');, try return <Redirect to="/blog" />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Cannot #update #existing #state #transition #Render #methods #pure #function #props
ADD COMMENT
Topic
Name
8+2 =