Rails, React, and Redux — Oh My!

Andrew Adams
2 min readApr 30, 2021

By far the best module. This is worth the ticket of admission right here.

Being able to tie together everything we’ve learned into one entity was awesome!

Photo by Danil Shostak on Unsplash

My project was fairly simple, but watching it work was amazing. It was like looking down and realizing I’d made a beautifully crafted wristwatch with all the gears working in unison. The power and scalability felt palpable as I was building my react components and wiring them together.

My project plays into building on the Ethereum blockchain. I made a simple Escrow contract app that would eventually tie in to and publish the immutable contracts to the blockchain.

Photo by Nick Chong on Unsplash

The Rails backend is works as a simple database with an API functionality. The backend schema is comprised of just one model, a “Contract”. A contract has a buyer’s address, a seller’s address, and an amount. There are other variables too, but a Web2 contract app would only need these three.

My frontend uses React components and actions that makes calls to the Rails backend and sorts the JSON responses into react components which are then rendered on the DOM. This app is fairly simple, so it just has one Contracts container, and then a few components to show all contracts, a single contract, a new contract form, a nav bar, and a home screen.

All in all, it was very exciting to tie everything together (and understand what I was doing at the same time!). I’m excited to keep building out this app’s functionality and hopefully post tie it to Ethereum.

-Andy

--

--