How to send value from one react component to another component?

Aug 23 2021 5:57 AM

Hi,

Ihave component 1 UserName which returns the logged in Username. Usename value needs to pass to UserLoggedInDate component.

In the UserLoggedInDate component, how to use username value as query parameter?

like fetch('user/getUserLoggedInDate?strUsername=' + "test")

Please help me how this can be done.

Thanks


Answers (2)