score:1
your componentdidupdate()
is the one causing infinite rendering issue
i can see that you already fetch the info in your componentdidmount()
, so it's not necessary to fetch them over again.
- first, after your component is rendered
componentdidmount
is invoked - then your
ensuredatafetched
is fetched. - your redux state is changed
- then your
componentdidupdate
invoked due to that re-rendering - your redux state is changed again.
- then your
componentdidupdate
invoke all over again. - infinite loop...
just remove this block will end that endlessly rendering:
public componentdidupdate() {
this.ensuredatafetched();
}
Source: stackoverflow.com
Related Query
- How to make only a get request on compoment click
- How to make an axios get request on button click event in React?
- how do I make a post and get request with ReactJS, Axios and Mailchimp?
- How to make AJAX GET request on the client to external site with React
- How make request to MirajeJS js only when I need it
- How can I make an axios get request wait before rendering my react component
- How to make only one API request when using React SSR?
- how to make useAppSelector wait for data from Get request (instead of showing initial data)
- How to make an API request In React on button click
- In react-table with React Hooks, how to make a get request inside Cell?
- How to make GET request to API continuously?
- How to make only one service layer for all request in react js?
- How to make only one button disabled on click in map method and how to change className after the timer expires in React?
- Javascript - How to make get request to local json file?
- How do make an api fetch request on button click Reactjs?
- how can i make a get request in axios to get the info of a user by clicking on his name using react.js
- How can we get a text and make it so it is display only a in limited amount of characters?
- How to make GET request with MERN Stack
- How do I limit my react-redux app to only make API request when required data is not available?
- How to make two Get requests, the second one can only be made after the return of the first one?
- How to make axios get request dynamically in react.js which has start and limit params?
- How to correctly make a get request during onChange
- I'm trying to make a POST request to get receive access token, however I'm receiving undefined. How can I resolve this please?
- How to make axios get request dynamically in react.js?
- How can I use an HTTP Get request to only get a specific attribute within an object in an Array?
- Cant make a fetch post request from front end client to local node server, only GET requests work
- How to send request on click React Hooks way?
- How to make AJAX request in redux
- How to get input text value on click in ReactJS
- How do I make an HTTP request in react-redux?
More Query from same tag
- React Get Another Component State
- React - Manually trigger onChange event on <input type="file">
- ReactJS - How can I make this option conditional?
- Trying to use jest with create-react-app and typescript. Get error: Jest: Failed to parse the TypeScript config file... Cannot find module 'ts-node'
- what is getFieldDecorator in antd and what is the use of getFieldDecorator in React?
- How to make a div scroll to the bottom of its container then scroll back up when it's done in React?
- Why my react `Carousel` does not render properly?
- React / Javascript map function - return array
- Work with global variables in React which are supplied at runtime and therefore unknown at build time
- React js Warning: Cannot update during an existing state transition (such as within `render`)
- list is not aligned vertically center in navbar in the flex
- How to map data:image/png;base64 in :
- Auth Nextjs website from getInitialProps with localstorage or cookie and Apollo
- Error when running next js - TypeError: (0 , react_jsx_dev_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxDEV) is not a function
- I am using react-dropzone in react js project, can't display preview image in chrome while working fine in firefox
- render multiple images in React using map
- Why are the arrays null when I'm sending form data using .NET API and React?
- React Router ^6.0.0-beta.0 history prop removal - navigating outside of react context
- How can I set the function to a state without the function being called?
- Create React App V2 - Multiple entry points
- Configure Nginx for React and Flask with Docker-Compose
- Should I use connect or hooks for react redux and which has better performance?
- ReactJS access to Virtual DOM reconciliation result
- How to add icone in 'svg' format to SweetAlert for Bootstrap?
- Working with nested Roles & Permissions in React Redux
- React - using arrows in a button
- How to change background-image with React when a page is loading?
- Couldn't find package "react" on the "npm" registry when creating a package
- How can you add styles in reactJs for show/hiding google maps?
- Get info from API request with parameters ReactJS