vaibhavmehta7570 / Whatsapp-web-clone-react_redux_firestore

0 stars 0 forks source link

Do not store things which can be derived from existing state values #9

Open sachinmk27 opened 4 years ago

sachinmk27 commented 4 years ago

https://github.com/vaibhavmehta7570/Whatsapp-web-clone-react_redux_firestore/blob/a1a11f688b53a6ab886ed6041638d51f2fe1a9e3/src/components/Chat.js#L16

Sijju-007 commented 4 years ago

Sorry sir, but didn't get this one.

sachinmk27 commented 4 years ago

For this, we can store the searchText, and original data in state. There is no need to store the search results in the state as well.