react

"mulling over state management stuff"
fsd 2021-04-28T13:03:18.138300Z

@lilactown Yes I am storing placeToBeHighlighted in local storage In the cards component, when a user hovers on the card I have this

:on-mouse-over #(set-item local-storage "parkToBeHighLighted" (:PlaceId place))        
:on-mouse-out #(set-item local-storage "parkToBeHighLighted" nil)

lilactown 2021-04-28T14:28:43.138600Z

why in local storage?

lilactown 2021-04-28T14:29:28.139200Z

you should probably store the state in local state of the parent of the Source component so that it will re-render when it changes

fsd 2021-04-28T14:59:28.142200Z

@lilactown thanks for the getting back, I was having some issue passing props to the component that’s why I thought to use local storage as easy solution to solve the issue. Is that the reason it might not be working as expected? UPDATE: Got it working 🙂