@nutlope This is awesome. Your youtube video is also really helpful!
May I ask, with the recent release of next.js 13.4, whether server actions can be turned into edge functions? I'm facing a 10-sec rate limit with chatGPT api, and I implemented it using server actions..
@addyosmani@shauntrennery I'm using server actions to call a third party api.. I guess another way to do this is to move the logic to a backend api route and apply rate limit/cache but since server action is new and seems so powerful, I wanted to make use of it and understand it better~ cc @dan_abramov
@addyosmani@shauntrennery Do you know/have examples of server action caching? I'm new to next.js and find the newly released server action feature really powerful. I saw rate limiting on api routes is possible but couldnt find much info on server actions as it was just released alpha..
@vercel@nextjs Just curious whether we can apply rate limits to server actions too.. ? like rate limiting on API routes? Is this something that will be supported in the future? Playing around with it as I find the new feature really powerful! @leeerob
If you’re on `ethers.js` v6, and want to use the `getDefaultProvider` function and get the “unsupported network” error, use a RPC url instead!
// v5
const provider = ethers.getDefaultProvider("goerli");
// v6
const provider = ethers.getDefaultProvider(rpcUrl);
#ethersjs
Okay, not it's more clear⚡️
- Using aborting or cancellation requests help with unnecessary requests, but nothing to do with "memory"
- If promise resolves, after component unmounts, setState will run, but it just won't do anything
Thank you @dan_abramov for clarifying this!
What I learnt today: 'setState on unmounted component warning' will be removed on the next version of react because:
1. There are false positives in some cases
2. Avoiding false positives leads to people adopting undesirable code patterns (hence, less readable)
⬇️
Now I'm confused.. In the code snippet below,
is it necessary to implement a cancellation?
But, Dan says there's no "memory leak" here... if so, cancellation is not needed..?
Am I the one only confused here..? cc @dan_abramov
#React#reactjs
@ryancarson@WhiteboardCryp1 Great recommendation👍🏽 I recently discovered their channel, and learnt so much from their videos! I love their content, and more than anything, their videos are fun to watch!