Youtube Player Demo



Youtube NPM package installer

npm install --save youtube-api-search

Functional component

Is a component that is a function. Some info goes in and some jsx comes out.

Class component

Is a component that has some internal record keeping (state).


When the state of a component changes this component is immediattely rerendered, as well as the children
of this component.

Downwards Dataflow

means that only the most parent component should fetch data from a data source.

Importing Youtube API

import YTSearch from 'youtube-api-search';

// how to use
    key: API_KEY,
    term: 'Mellotron'
}, function(data) {

Props (properties)

if you convert a functional component to a class component then props becomes this.props.

this.props is available to all functions in a class component.

Last update: Mon, 23 Oct 2017 22:15:01