Build a Mini Netflix with React

Tudip Technologies
2 min readJul 1, 2021

--

What is React?

React is a JavaScript library created by Facebook for building fast and interactive user interfaces for efficient user interfaces and single page applications. With React, we can build reusable UI components in our app.

Install create-react-app

Facebook has a command line tool, create-react-app that can scaffold a progressive web app out of the box in less than a minute. If you don’t have it installed, please install and run the command below in your terminal:

npm install -g create-react-app

This will install the create-react-app command line tool, which will make it easy to initialize our app with React.

Setup React

Run the below command via the command line to create a new react project named mininetflix

create-react-app mininetflix

Navigate to the mininetflix directory using the below command

cd mininetflix

Now let’s add a CSS framework i.e bootstrap to style our app. Simply open the project and edit the public/index.html file and put the following snippet inside the <head> section just before the <title>.

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" />

Install Dependencies

Let’s set up the dependencies below using npm, simply run the command npm i <package name> mentioned below.
npm install accepts an array of packages separated by space, which will create installation processes with the sequence of packages. Use the below command to install all the required packages for our project.

npm i auth0-js react-router react-router-dom history jwt-decode axios
  1. auth0-js: Used for authentication
  2. react-router, react-router-dom: Used for routing within our app
  3. history: to manage browser history
  4. jwt-decode: Used for decoding the JSON Web Token (JWT) in the app
  5. axios: Used for making HTTP requests from the browser

Read more: https://tudip.com/blog-post/build-a-mini-netflix-with-react/

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response