R
R
Roman2017-03-21 15:58:15
JavaScript
Roman, 2017-03-21 15:58:15

Where to place Facebook API logic in React/Redux SPA?

The authorization procedure and, in general, working with Facebook involves the use of various requests.
First you need to find out the status of the user (authorized or not), if not, then authorize. Get some data on the user, etc.
If I were developing a similar application in angular, I would wrap calls to the Facebook API in an angular service and use it.
Where should this logic be placed in a React/Redux app?
I have a userReducer and a userAction - should I put everything in there? Or do I need to make a separate reducer? or is it middleware?
I'm just starting to understand, so do not judge strictly)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2017-03-24
@undefined_title

make a request in actions, change the state in reducers, use react-redux-middleware

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question