We all familiarize ourselves with the traditional class-based React components. Sometimes we use functional components for some display components that do not need to use state. The functional components have fewer lines of code and more approachable. For example, if you want to call aprops that was passed down from a higher-level component, you can just use props instead of this.props which is always use in class components. I love using functional components to write a React app but it has some drawbacks compared with class components. We can not initialize state in functional components...

Image for post
Image for post

…Until Hooks was released with…


When finishing the project for my phase 3 at Flatiron School, I found myself interested in the authentication part the most. By using Bcrypt gem, we can make authentication for our single page application built in Javascript. I created a Github repo of a Rails API with a basic HTML page for the frontend part and an MVC for just 1 table “user”. The repo is attached at the end of this blog, you can use it to code along.

Image for post
Image for post

Our page right now will look like below.

We will together to make authentication for our page. If someone signs…


Image for post
Image for post

At Flatiron Software Engineer Intensive Bootcamp, we have worked on many projects, especially big projects after each module. In module 2, we learned how to build a Rails app with full features. I and my partner built a great app for travelers for a project of module 2. With Bootstrap supported on Rails, our Rails app looks like a modern website. That’s why after finishing the project, I was excited to deploy it on Heroku to share my project with everyone. But we all know, Heroku only supports deploying an app using Postgresql database. …


Image for post
Image for post

When getting immersed in the world of Ruby and Rails, I realized the awesomeness of ActiveRecord. Through associations between models(has_many, has_one, belongs_to), it helps us write only one line for a specific job that often needs a lot of logic in ruby and SQL. By using ActiveRecord, you can easily manipulate data stored in a relational database.

For example, we have a basic relationship between 3 models: post, blogger, and destination. Using ActiveRecord, the associations will be set like this:


When I started coding, I usually ignored reading the errors. It is mainly because of the abundant lines filled with letters in the terminal. Altogether, they look like a big mess, and they seem to be very difficult to comprehend.

Image for post
Image for post

When I started coding, I usually ignored reading the errors. It is mainly because of the abundant lines filled with letters in the terminal. Altogether, they look like a big mess, and they seem to be very difficult to comprehend. After a few weeks of continuously coding at Flatiron School, I realized that 99% of the time in coding is…

Chi Nguyen

Full Stack Developer Connect with me here: https://www.linkedin.com/in/chi-nguyen-swe/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store