use-state

Send component new props react - Stuck

倾然丶 夕夏残阳落幕 提交于 2020-05-16 22:00:17
问题 I have been stuck for a few hours now.. I am trying to send a component new props... but It wont get the new ones. Here is what happens. First the user clicks a button on the post component... It fires the function, 'add favorites' and 'addFavs' on the parent component below. These two functions determine if it should add the user to favorites or delete the user from favorites. When the user is added as a favorite, the button they clicked, inside the searchResults component, appears a

Send component new props react - Stuck

孤者浪人 提交于 2020-05-16 22:00:01
问题 I have been stuck for a few hours now.. I am trying to send a component new props... but It wont get the new ones. Here is what happens. First the user clicks a button on the post component... It fires the function, 'add favorites' and 'addFavs' on the parent component below. These two functions determine if it should add the user to favorites or delete the user from favorites. When the user is added as a favorite, the button they clicked, inside the searchResults component, appears a