React & Redux Sandwich Shop

Dr. Sumedh Kanade
kanade/dev
Published in
2 min readJun 25, 2020

This is an old post migrated from my previous blog

This is a little app I wrote last year using React and Redux, with TypeScript.

Essentially, you click on the individual ingredients you want in your sandwich, see the order build up on the side, and hit ORDER when ready. The stock updates, and the order totals build up in the manager’s dashboard at the bottom. Obviously a simplistic demo but the point is to show reusable React components and one-way state flow with Redux.

Site hosted at: http://react-redux-sandwich-shop.herokuapp.com/

Source on BitBucket: https://bitbucket.org/chocolaaaaate/react-redux-sandwich-shop/

Simple app where you select ingredients for your sandwich and hit Order! State managed by redux between the various components on this page.

An example component, the FoodItem component (each of the ingredient boxes) is shown below:

Food items related actions and reducers are shown below:

I love the discipline in state management that Redux forces. And the Redux tools are amazing!

At some point I’ll be following up with posts about advanced ReactJS.

--

--

Dr. Sumedh Kanade
kanade/dev

Trained as a physician, and software engineer. Passionate about using technology to make a difference in healthcare. Dev blog at: https://medium.com/kanade-dev