YPM React test task
Its just a optimized code. You can replace this to existing project file and can run it.
- To reduce and optimize code, I have used map and reduce array methods instead of loop.
- For stop re-rendering, I have added hook - useEffect that will be run one time render only
- Same function used for first time render and when call the 'onPickHandler' props function of 'StudentsPicker' component