Code Monkey home page Code Monkey logo

kurztube's Introduction

Introduction

This is a video search app built within a React/Redux course and has been slightly modified. The app connects to the YouTube API and lets users search for and display a list of videos, select one of the results and play it in the browser. The key adaptation made to this app was layout related, I created mobile and widescreen modes. This was done by creating a function that checks for screen width and displays a mobile or widescreen class name that sets the styling for either class of device.

Main Technologies

React

React was used to create components within the app. These components are written in JSX, a markup language, and this is then converted to html in the browser via Babel.

Custom Hook

This app features a custom hook. Hooks are techniques used by React that allow functional components to emulate the functionality of class-based components (CBCs). Hooks are a condensed way to mimic functionality that is more verbosely scripted in CBCs. By combining different hooks, in this case useEffect and useState, we can create a custom hook that lets us separate out logic related to functions that would otherwise be duplicated in multiple places in a code-base. This simplifies maintenance of this code, and makes it reusable by multiple components.

In this case, the custom hook extracts video fetching logic from a component and makes it easily available to others.

Additional Node Modules and Add-ons

  • Axios: Lets us make asynchronous requests (ie. requests that take a finite amount of time) to our API server

Main Folders

Folders within src

  • components: all React components

  • hooks: contains the custom hook

  • apis: Axios clients, ie. functions that form the basis for requests made in this case to our YouTube api

Hosting

This app is hosted on Netlify.

kurztube's People

Contributors

ddavisj avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.