A nerd in books, tea, games and software.
I'm a solutions engineer lead, GitHub Star, Director of WomenDevsSG, and co founder of ragTech. I work at the intersection of tech, systems, and leadership, and this blog is where I share my journey through all three. Expect honest reflections, real experiences, and thoughts that are still forming rather than polished career advice.
Markdown supported · ⌘↵ to post
Thanks 👍 this was a great example. I wonder if I could set the placeholder in the search bar to update too.
Benjamin Ik
In a situation where am not fetching data in the network, but fetching data from my local data array in my app (eg './contactData.js'). How do I change the code below to get the data
const fetchData = async () => { const res = await fetch('api.opendota.com/api/heroes&); const json = await res.json(); setData(json); setHeroes(json.slice()); };