React NextJS Create Instagram UI clone — Header and tooltip Part 4

Part 4 Conditional render the search icon and cross icon

Dec 3, 2021 · 2 min read

In this article, we are mainly focusing on setting the visibility of the search icon and the cross icon.

If you look at the real instagram website, you can see if the user clicks on the input box, the search icon will disppear and the cross icon pop up, vice versa.