vendredi 9 juin 2017

Where do I write Data Access Class?

I am developping an app where I need to ask to a web services data to display in a react.js application.

I have :

Component.js (This is where I have a constructor and a render function)

LeagueAPI.js (This is where I want to write the methods like getChampions() or getItem(idItem))

Is this a correct way to do it (by creating a new module) or do I have to do the API calls in my constructor method ?

Thanks for answering this :)

Regards.

Aucun commentaire:

Enregistrer un commentaire