Next.js Discord

Discord Forum

I have a problem with my searchbar doesnt show search results from axios api immediately

Chinese Alligator posted this in #help-forum
Open in Discord
Chinese AlligatorOP
here is my quesiton on SO I posted few minutes ago with question description and code, please take a look:

I have an issue with search results not being displayed immediately under search input in command component. I see results in console and for example for replay it is not empty, but on UI I see Loading... for split second and then nothing is shown under the input. But when I close and open search command again - results are populated correctly. Can someone suggest the solution here? Maybe I am doing data fetching in a wrong way or not rerendering command component? I am pretty new to NextJs and learning as I develop something. Appreciate any help. I am using Next.js 14.2.3

0 Replies