Go Local: React/Redux App

Go Local: React/Redux App

Been a long time trying to get this to work properly. This blog post will be in-depth.

Been a long time trying to get this to work properly. This blog post will be in-depth. I created an app that allows local business owners to register for an account and post announcements for their businesses. I admit it isn’t the best looking app right now but I would like to apply more styling to it in the future and add additional features, like maybe a search functionality.

Ruby on Rails Setup

The backend API was built using Ruby on Rails. When building out an API for a front-end application there are a couple of things to do. First, you have to enter this into the command line to start up a new Rails API:

rails new your_app --api

And if you want to use a database like Postgresql, you add this to the command, that way Rails knows what database it will use for your API. You can leave it blank if you choose to use SQLite instead, which is the default database Rails typically uses.

rails new your_app --api -d=postgresql

When building out your API, there are a couple modifications to the config folder. First, in the initializers folder is your cors.rb file, you’ll have to modify it to be able to use both localhost:3000 and localhost:3001. Because your front-end is rendering information from the database, they have to be connected.

Image for post

Don’t forget your methods!

If you’re going to use Postgresql like I did, here is the main troubleshooting issue that I encountered and the solution to fix it.

redux react

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

How native is React Native? | React Native vs Native App Development

Article covers: How native is react native?, React Native vs (Ionic, Cordova), Similarities and difference between React Native and Native App Development.

React Native Redux | How To Use Redux In React Native

React Native Redux Example Tutorial From Scratch. We connect the React Native app to Redux store to save and retrieve the application data.

React and React Redux — Connecting to Redux

Redux is a light weighted State Management Tool that helps the components in our React App to communicate with each other. The simple concept behind this is that every state of the component is kept in a store that will be global. So that every component can access any state from that store.

Accessing Redux from Components In React & React Native

How to set up a basic version of Redux in your React or React Native application. To make things clearer, I based my setup on my event application, where users create events that other users attend. We generated the action creators, reducers, and Redux store, and wrapped the application in a provider.

A Basic Redux Setup in React/React Native

Redux is a powerful state management tool that can be very useful as your React or React Native application grows and requires you to keep track of more state.