'how to trigger useeffect from another component
i want to trigger useEffect which is present in User component from the AddUser component
In Adduser component it adds the user data to api and in user component it fetches the api
<div>
<ToastContainer position="bottom-center" />
{addUserShown && <AddUser onHideAddUser={closeAddUser} />}
<Header
onShowAddUser={toggleAddUser}
onSearchOnSubmit={handleSearchSubmit}
/>
<Users searchPostData={searchPostData} />
</div>
);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
