reactjs - Data Flow with React/Redux and Express -


i have react/redux front-end express back-end application, , i'm rather new, have question regarding how deal flow of data.

so, on front end side, have search bar. when user enters search term, sent post request react handled in express routes.js file. in file, taking search term, , looking term in mongo database. after that, want send object if term found in database.

i have used axios in application make http request route pull off data, within app.get(...) on express side, , used axios.get(...) on react side retrieve information.

but, situation different since data flowing in 2 directions. initially, front end backend, , back-end front-end. , in case, i'm using app.post(...).

now question is, how retrieve data front end? axios.get(...) on app.post(...) or there other way this?

if browser back-end's route implemented respond post only, 405 error. implement post axios request , post express reply.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -