Cannot display items by pasing value from context component

So i wanna display my cart item in the cart list, as i have set the initial state of cart to storeProducts, 8 of my products should be rendered as i’m using the map function. I haven’t made the ui of my cartItem.js yet, but instead, i should have 8 lines of text as “this is a cart item” from my cartItem.js. Please help me to find out what’s wrong with my codes! Thank you so much!

Error: Too many re-renders. because i changed setState

error: Too many re-renders.
explaining code: (
iam maping array of object – in that mapping funtion i maked new array of objects( raiting = [..rating, {}] )
then set useState state to be that array of objects ( setRatingFinal([...rating]) )
and then final i display that – but iam getting error.
Can somebody write me answer for this, if its posible to write code in answer.

Custom function not rendering on React Native

I’m working on a react native project and I have an object in javascript containing a bunch of different categories, and items under that category. I also have a function (renderButtons()) that is supposed to render them, mapping the object so that each item is displayed as a button under its respective category. But, for some reason, this function just isn’t displaying anything on the page.

Is it possible to activate a scrollTo before React renders its components?

In my React application, I have a TextHistory component which displays the save history of a given text in a small wrapper. React Router permits me to access every version separately (localhost:3000/view/[textId]/[versionId]). At each version switch, React Router rerenders the entire page, including the TextHistory, which resets its scroll position to the top of its wrapper.

React useContext() performance, useContext inside custom hook

I used a structure using React Hooks. It is based on a global Context that contains a combination of reducers (as in the Redux).
Also, I widely use custom hooks to separate logic.
I have a hook that contains asynchronous API requests and it has become quite cumbersome and I have the opportunity to split almost every function of this hook into other hooks, but each of these functions uses a global context (more precisely – dispatch from useReducer()).