I have a question which hope you might be able to help me with.
If I was to create a custom class class 'SPList', and on my componentDidMount function or the constructor. I was to call a REST operation, to retrieve me the first 5 list items, i would be able to do that quite easily.
I could output all the list item information from inside the SPList class' render method, by using the map function. So I understand doing it that way.
What I would quite like to know, is if I wanted to add a function to my SPList class called 'DeleteItem(index: number)' - this would need to have stored the JSON result from the REST call into a custom object such as 'SPListItem'. This way SPList can hold an array of these objects, to be able to perform the DeleteItem on.
But if I was to do that, inside the SPList class render function I would then need to explicitaly call the Render method for each SPListItem within the array. It starts to get pretty messy.
I was wondering what is the best approach to the above scenatio? Any help, as always is greatly appreciated.