120
rated 0 times
[
123]
[
3]
/ answers: 1 / hits: 19751
/ 9 Years ago, tue, march 31, 2015, 12:00:00
I have a React component which receives an array or objects via props
. Something I would like to do is have an event re-order these props. However, it seems that React re-rendering only occurs when state
changes.
Right now I have the ordering handled in the parent object and pass the method to handle the ordering through as a prop, but ideally I want the component responsible for rendering these objects to also handle the ordering.
Chucking props
into state
seems bad, but what's the best thing to do here?
More From » reactjs