Question Which is better create object at the time of filter record or route page?

Dev Think

Member
Joined
Jun 23, 2021
Messages
15
Programming Experience
1-3
I am using application of ASP.Net Core with React.js. In User.Js file when we uses record filter option then we switch from one page(User) to another page(ChangeUser) and when after back from page (ChangeUser to User) page, my filter record is reset. So i have handle this situation by create newly object to save filter record fields but i am confuse which is better approach for application performance for this newly create object, Should i create this object at the time of perform action of filter button or the action of route button.
I know i am not sharing code with you because it is confidential. I hope you understand and will suggest better approach for my scenario
 
Unless creating the filter record is a major bottleneck in performance, you are doing premature optimization.
 
Back
Top Bottom