I’m pretty much new to APIs, especially regarding Thunk.
I’d like to ask about the best way to store (JSON) data.
I have a series of lists. At the moment an API call is made when a user clicks an item on the list. Then that new JSON is filtered and replaces the existing list. Constantly calling the API seems like a bad way to do things and I would like some advice on doing one big API call on app start.
What is the best way to store a bunch of API calls, or is there a way to filter the JSON IN Thunkable as at the moment I can get Properties and Objects, but not filter them before I extract the objects to a list, nor after.
I’ve tried to do a big API call at the start and store each API response as a variable. But I then can’t call the data later and insert it into a list as is shown below.
For example, when I use this:
which does return a correct list (ignore the “
do something”), I’m not sure how to filter it at the point while it is still JSON, or after it becomes a list in storedEventsList. I would guess that I would do it after.
At the moment I change the API URL and do a new API call for each time the list is changed. Which obviously isn’t ideal…