✅ – Ygg – 22-32 Mar 8
Hello, I'm using a
FreeCompanyContext
to use some variables across my website
One of then is using a function
to fetch a list of objects from an api.
The list can be lenghty so I decided to track the progress to show it in the UI :
And then I'm using it in the component:
Everything works just fine, except that fetchProgress
is a useState
so it re-renders everytime it changes and that make the whole page a mess to use (since it's re-rendering the whole page)
The gif is just to show the :hover
effect going crazy because of that, this re-renders also make it harder to click the tabs.
So, my question: what's the best approach to this?
I'm a newbie so any obvious suggestions could end up being great!Solution:
Message Not Public
Sign In & Join Server To View
UU
Unknown User•422d ago
Y
Ygg•422d ago
I see! So if I wrap the
loading
around it, it'll only re-render this component? Or I should wrap the whole page?UU
Unknown User•422d ago
Y
Ygg•422d ago
I'll learn more about it, I answered based on a quickly search. That's something I wasn't aware it even exist for your time! Really helped!
UU
Unknown User•421d ago
230KMembers
View on DiscordMore Posts
VuNguyen – 12-56 Mar 8How do I create a virtual microphone, then pipe audio to it using NodeJS?VuNguyen – 05-04 Mar 8Hey, I'm currently looking for a way to create an output device with NodeJS, then other programs canVuNguyen – 12-59 Mar 4Hey, how do I check if user is swiping up or down using JS?
Here is my attempt:
Store the initial ✅ – dmikester1 – 16-24 Mar 2I am trying to figure this issue out with this json-storage library. It does not support promises.