ReactFoo 2017

A conference on React

Consuming services reliably in Redux without losing your mind

Submitted by Sidhartha Chatterjee (@sidharthachatterjee) on Wednesday, 15 March 2017

videocam_off

Technical level

Intermediate

Section

Crisp Talk

Status

Confirmed & Scheduled

View proposal in schedule

Vote on this proposal

Login to vote

Total votes:  +19

Abstract

With most apps being built with React these days and Redux being a very popular state management library, have we identified a standard pattern for consuming APIs?

What about JWT, automatic retries, caching, optimistic updates and handing failure?

This talk approaches all of the above and identifies reusable patterns to make this a breeze.

Outline

Problem Statement

We identify potential issues with the most common ways of consuming services, in componentDidMount.

How do we fix this

  • we write simple middleware to handle API calls and define a standard for actions that trigger this
  • we build a mechanism for handling JWT with automatic token refresh and storage
  • we build an automatic failure and retry mechanism
  • we add caching into the mix

Conclusion

It looks like we just built a really reliable web app, folks.

Speaker bio

Sidhartha is a software developer and entrepreneur with a passion for finding elegant solutions to hard problems, and tiramisu.

He has previously worked for Insider.in where he built much of the complex microservices and setup infrastructure.

Besides functional programming and DevOps, he has special interests in serverless computing. On Sundays, you’ll find him playing the guitar or walking his dog, Love.

Comments

  • 1
    Sandhya Ramesh (@sandhyaramesh) Reviewer a year ago

    Hi Sidhartha, to evaluate your proposal we need both your slides and a video of you speaking (any other conference or a two minute self recorded video explaining the talk). Please upload these so that we can proceed with your proposal.

Login with Twitter or Google to leave a comment