automch-code / google-scraping

0 stars 0 forks source link

[Question] Why use redux-toolkit? #25

Closed olivierobert closed 11 months ago

olivierobert commented 11 months ago

Factoring the requirements of the code challenge, why use redux-toolkit over a lighter alternative such as SWR or react-query, or even not use any third-party library? Please explain your motivations and goals.

Since the frontend application uses Next.JS, it might not be as complex to implement fetching and rendering data 💡

automch-code commented 11 months ago

Hi Olivier, sorry for late reply I agree with you I think I'm overengineering implementing the redux-toolkit to the application. I tried to figure out how to generic the API request to the same place and if I had a new API route from Rails, so I could add it to the .query.ts

After I read your comment and went back to read the requirements, there were not too many routes to use, and not complex at all. Actually, in a short amount of time, using react-query and SWR will be faster for implementation and easy to use.

olivierobert commented 11 months ago

Understood. It does feel overengineered in this case 🙈 Let's not revisit it for this code challenge and keep this learning for a future project.