A duplicate-message bug in a Next.js App Router chat wasn’t caused by React rendering twice.
The history request ran twice with the previous jobId during navigation.
The culprit: route identity copied into shared context in useEffect—after descendants had already rendered.
I'm a kind of person these days. who want good productivity and gets burnouts then rests for couple days see the strategy again changes for better productivity. This time i changed around consistency, coz i read and concluded productivity is a byproduct.
Let's see what's next.
you just joined your first company. You use ai for everything research, etc. just to align with industry. And now you encountered a good issue in production. Stackoverflow content is not updated these days coz people use ai.
It's complete hell.
Don't panic, think what you can do
I was learning different compiler options got to know there are some for Code Quality and Hygiene also.
noImplicitReturns: Forces to return value from every path of code.
Read More https://t.co/d700j5IzLT
I was learning different compiler options got to know there are some for Code Quality and Hygiene also.
noImplicitReturns: Forces to return value from every path of code.
Read More https://t.co/d700j5IzLT
@piyushgarg_dev still my code to ai code ratio is 3:2
I spend most of my time in brainstroming with ai.
Around possibilities, best ways to do specific task, and engineering best practices.
D33
Learned some tips:
- Child + props composition for reusable, flexible components.
- use key for intentional rendering.
- keep JSX clean using conditional rendering
- Portals for rendering outside of parent hierarchy.
- Passing Refs as props
- Default props in destructuring
second is initialState and last one is optional permalink which is used to restore returned data from action.
useActionState returns currentState, formaction to be used in form action attr and isPending status of action.
D31
useActionState is useFormState just renamed.
for official release.
it get mainly two params that is fn which is action function which receives prevState and formData.