In React, inside a functional component is it a good practice to use a props array to filter it and assign to a const and use that without setting the const value to a useState. In this case i don't have any state updation inside the component.
0
votes
I'm not sure what you're asking.
– Dave Newton
can you add your code also
– Aravinda Meewalaarachchi
The problem with this approach is that you are not triggering a rerender, we use states to trigger a rerender on the components, either a change in the component state or a change in the props.
– Menawer
The component gets props from parent and there is no state changes specific to the child. For example there is no events and just need to render the filtered prop in the UI.
– ash