yogeshpeculiar / Fitness_App

2 stars 0 forks source link

API functions must be as pure as possible #2

Open Yatanvesh opened 4 years ago

Yatanvesh commented 4 years ago

As mentioned, API calls must only contain, well, API calls. (See methods.js, login function) Redux logic and other logic must reside inside reducer actions or the calling component.

yogeshpeculiar commented 4 years ago

Ok...i ll c to it..

On Tue, 16 Jun 2020, 08:42 Yatan Vesh, notifications@github.com wrote:

As mentioned, API calls must only contain, well, API calls. (See methods.js, login function) Redux logic and other logic must reside inside reducer actions or the calling component.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yogeshpeculiar/Fitness_App/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKL23VUFS4MOH3SZJX5UYYTRW3PILANCNFSM4N7GOD7A .

Yatanvesh commented 4 years ago
  store.dispatch({ type: 'ADD_JWT', jwt: response.data.token })

even this line shouldnt here. deal with jwt in your container component