Search bars, I have completed a few.
Now that I was tasked with completing a few more it should be pretty easy right?
Well, it should have been, but I like to make problems. It’s something I’ve been good at since I was young.
The problem was I began making a search bar where there was a shared component. Because of this when I would play around in local host I was unsure which bar was being displayed since
the search bar would appear in the exact same place, just different pages.
For some reason, when I was playing around I wasn’t sure which menu was popping up. because this menu which the search bar would be a part of was finicky.
So what did I have to do with the shared menu that was finicky, I stopped sharing the menu between the different pages.
Not permanently!
Since I was having such difficulty, I took the code out of the shared menu function and did it the long way.
I made the menus again in the large component, and then I added the search bar.
Once I finally got it working, I moved the shared code over into it’s proper function, like it was initially.
I suppose the lesson for today is that sometimes like a mechanic you need to move the part you are working on to another place to have a better understanding of what is going on.
Best,
Merl