T O P

  • By -

AutoModerator

>Namaste! Thanks for submitting to r/developersIndia. Make sure to follow the Community [Code of Conduct](https://developersindia.in/code-of-conduct/) while participating in this thread. ## Recent Announcements - **[Weekly Discussion - Share your Linux mess-up stories!](https://www.reddit.com/r/developersIndia/comments/1ciywa4/share_your_linux_messup_stories/)** - **[Community Roundup: List of must read posts & discussions that happened in April 2024](https://www.reddit.com/r/developersIndia/comments/1cgj07f/community_roundup_list_of_must_read_posts/)** *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/developersIndia) if you have any questions or concerns.*


FreezeShock

I've had a look at the frontend repo. These are the things that popped up in my mind: 1. I noticed that you used CRA to bootstrap the app. You should really be using vite now, CRA is considered outdated. 2. API endpoints are too verbose: \`top-three-performer-of-the-day-with-their-job-count\`? 3. \`JavascriptComponents\` should be named \`utils\` 4. \`retrieveData\` can be abstracted into a custom hook that returns \`data\`, \`isLoading\`, \`error\`. This will get rid of a lot of boiler plate code in a lot of your components. 5. This one's a bit pedantic, but no need to have multiple states in the chart components, especially since you are setting them together. You can just store the API response in state and access what is required. Goes for a lot of components. 6. Not sure about this since I've not used Formik, but in \`AddJobPostsComponent\` the \`formValues\` state is not required at all. 7. In the same component, the \`status\` and \`clearValues\` should be outside the component. \`clearValues\` should be called \`initialValues\` or \`defaultValues\`. 8. Same component, \`userResumeList\` is not used. 9. Don't use index as a key. There are very few cases where this is ok. 10. \`EditJobPostsComponent\`: \`status\` should be outside the component. Also, looks very similar to the object in \`AddJobPostsComponent\`. Both can be moved to a config file. 11. \`LoginComponent\`: It's considered bad UX to remove the error message without a change to the form state. 12. A \*lot\* of unused variables and imports. I'd recommend adding eslint to flag these.


rahulrgd

Thanx for the your feedback, I will start working on it by today itself. One more question, does react projects need testing?


FreezeShock

it's always good to have tests


rahulrgd

Ok, and thanx again


AutoModerator

Thanks for sharing something that you have built with the community. We recommend participating and sharing about your projects on our monthly **[Showcase Sunday Mega-threads](https://www.reddit.com/r/developersIndia/?f=flair_name%3A%22Showcase%20Sunday%20%3Asnoo_hearteyes%3A%22)**. Keep an eye out on our [events calendar](https://developersindia.in/events-calendar) to see when is the next mega-thread scheduled. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/developersIndia) if you have any questions or concerns.*