Skip to content
Advertisement

How to write a hook to load more button from fetching a json?

I am calling my fake api using fetch and getting Json data. How can I wire up my load more button so that it it loads more data?

Everything works, I just need to add functionality to that load button. I have an empyt function…

See code below:

JavaScript

Advertisement

Answer

So you already have all the data but you need to dispaly it in pieces? How about this.

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement