Fork me on GitHub
#react
<
2021-04-28
>
fsd13:04:18

@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)

lilactown14:04:43

why in local storage?

lilactown14:04:28

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

fsd14:04:28

@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 🙂