DEV Community

Discussion on: React.js Interview - technical submission and detailed feedback

Collapse
 
ogranada profile image
Andres Granada

Hello, first of all, great work, many things about great coding here.
IMHO I think you have a great knowledge about typescript and the generics, that is great, but trying to make scalable you added many things that could be easier for a 2 endpoints project.
You could add some extra details, being careful creating the http instance using a singleton pattern (isolation by module is good but isolation by instance is better). API double calls could be related with the useEffect return statement (useStockListingTable.tsx have no clean function, check dev.to/ag-grid/react-18-avoiding-u...).

In general I enjoyed check your code, many react magic things, just some details. Also, no all the companies have the same criteria to work, therefore, learn from this and point to new companies that need your talent. Thanks for sharing.

Collapse
 
rajeshroyal profile image
Rajesh Royal

Thank you for reading @ogranada
The API dual call happen in only dev mode of React V18. In prod build everything is working perfect.

If you can explain a little bit about it or share some resources I would love to learn - (isolation by module is good but isolation by instance is better)

Collapse
 
makranelhoucine profile image
EL HOUCINE MAKRAN

Because of StrictMode component used in index.js/ts

If you remove it ReactJs will do only one render not twice in development also