Day-05
โ Data fetching in next.js
๐ if static site generation sort pried of time regeneration so its call ISR.
๐ Client Comp. API CAll normally same like react.js
๐ Server Comp. API CAll
It wasn't quite yet time to panic.
It wasn't quite yet time to panic. There was still time to salvage the situation. At least that is what she was telling himself. The reality was that it was time to panic and there wasn't time to salvage the situation, but he continued to delude himself into believing there was.
She was aware that things could go wrong.
She was aware that things could go wrong. In fact, she had trained her entire life in anticipation that things would go wrong one day. She had quiet confidence as she started to see that this was the day that all her training would be worthwhile and useful. At this point, she had no idea just how wrong everything would go that day.
She wanted rainbow hair.
She wanted rainbow hair. That's what she told the hairdresser. It should be deep rainbow colors, too. She wasn't interested in pastel rainbow hair. She wanted it deep and vibrant so there was no doubt that she had done this on purpose.
๐ web api fetch extend by next js so support extra options like [reValidation,caching]
๐ page label loading page make and page return block by api call or any reason then show loading page.
๐mainly not api call on page because its block hole page.
๐ best practice api call brake in components so use streaming data.
๐ using Promise.all([...]) use to call parallel api call, if not depending on each others.
โ Render server component in client component
๐ By Default parent component is client comp. so automatically inside all render components become client components
๐ if prevent it so pass server comp. as children or props on client comp. and then render in client component.
๐ very useful when use redux, context api or any state management library