From 2bb49de3b2ad2a3c2324a2ded4975cbb816e8edb Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 14:01:22 -0700 Subject: [PATCH 01/11] change to title in app --- src/components/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/app.js b/src/components/app.js index 58614b02cf..4a67fde256 100644 --- a/src/components/app.js +++ b/src/components/app.js @@ -3,7 +3,7 @@ import React, { Component } from 'react'; export default class App extends Component { render() { return ( -
React simple starter
+
Hello there!
); } } From 8a1a31ef3e556584e8cef177c85cf0db313fe97c Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 14:04:24 -0700 Subject: [PATCH 02/11] delete old boiler and set new index --- src/actions/index.js | 0 src/components/app.js | 9 --------- src/index.js | 15 --------------- src/reducers/index.js | 7 ------- 4 files changed, 31 deletions(-) delete mode 100644 src/actions/index.js delete mode 100644 src/components/app.js delete mode 100644 src/reducers/index.js diff --git a/src/actions/index.js b/src/actions/index.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/components/app.js b/src/components/app.js deleted file mode 100644 index 4a67fde256..0000000000 --- a/src/components/app.js +++ /dev/null @@ -1,9 +0,0 @@ -import React, { Component } from 'react'; - -export default class App extends Component { - render() { - return ( -
Hello there!
- ); - } -} diff --git a/src/index.js b/src/index.js index 69d577acd1..e69de29bb2 100644 --- a/src/index.js +++ b/src/index.js @@ -1,15 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import { Provider } from 'react-redux'; -import { createStore, applyMiddleware } from 'redux'; - -import App from './components/app'; -import reducers from './reducers'; - -const createStoreWithMiddleware = applyMiddleware()(createStore); - -ReactDOM.render( - - - - , document.querySelector('.container')); diff --git a/src/reducers/index.js b/src/reducers/index.js deleted file mode 100644 index d12506f382..0000000000 --- a/src/reducers/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { combineReducers } from 'redux'; - -const rootReducer = combineReducers({ - state: (state = {}) => state -}); - -export default rootReducer; From 5f9f8776181754a9b27d9b9e9bc4a7823a24a927 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 18:30:48 -0700 Subject: [PATCH 03/11] add one line --- src/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/index.js b/src/index.js index e69de29bb2..9eb7389f0e 100644 --- a/src/index.js +++ b/src/index.js @@ -0,0 +1,9 @@ +// Create a new component. This component should produce +// some HTML +const App = function(){ + return
Hi!
; +} + +// Take this component's generated HTML and +// put is on the page(in DOM) +React.render(App); From c157346c230bd122b0d377506a1b314efc31b8e7 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 20:02:12 -0700 Subject: [PATCH 04/11] Component instances and component classes --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 9eb7389f0e..db676ecaa0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,5 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; // Create a new component. This component should produce // some HTML const App = function(){ @@ -6,4 +8,4 @@ const App = function(){ // Take this component's generated HTML and // put is on the page(in DOM) -React.render(App); +ReactDOM.render(, document.querySelector('.container')); From 15df7d4febf8998de6f2e68aef4156d65fb86f7b Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 20:02:33 -0700 Subject: [PATCH 05/11] render targets --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index db676ecaa0..d4108f8c9f 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; // Create a new component. This component should produce // some HTML -const App = function(){ +const App = () => { return
Hi!
; } From 24317107b19e819bc6ced388c3f2968f23f32ecd Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 20:18:32 -0700 Subject: [PATCH 06/11] component structure --- src/components/search_bar.js | 0 src/components/video_detail.js | 0 src/components/video_list.js | 0 src/components/video_list_item.js | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/components/search_bar.js create mode 100644 src/components/video_detail.js create mode 100644 src/components/video_list.js create mode 100644 src/components/video_list_item.js diff --git a/src/components/search_bar.js b/src/components/search_bar.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/components/video_detail.js b/src/components/video_detail.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/components/video_list.js b/src/components/video_list.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/components/video_list_item.js b/src/components/video_list_item.js new file mode 100644 index 0000000000..e69de29bb2 From 3e0dda212400b156f43ab11fbccab767fe856188 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 20:29:43 -0700 Subject: [PATCH 07/11] add youtube search api package --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f6c26e7b66..72bc3fc176 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "react": "16.3.2", "react-dom": "16.3.2", "react-redux": "5.0.7", - "redux": "4.0.0" + "redux": "4.0.0", + "youtube-api-search": "0.0.5" } } From 95ff2798562014ba6092da86c127250f50d259c4 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 20:41:17 -0700 Subject: [PATCH 08/11] export searchbar reference --- src/components/search_bar.js | 7 +++++++ src/index.js | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/search_bar.js b/src/components/search_bar.js index e69de29bb2..f13a3be2e8 100644 --- a/src/components/search_bar.js +++ b/src/components/search_bar.js @@ -0,0 +1,7 @@ +import React from 'react'; + +const SearchBar = () =>{ + return +} + +export default SearchBar; diff --git a/src/index.js b/src/index.js index d4108f8c9f..b53cf14416 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,16 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import SearchBar from './components/search_bar'; +const API_KEY = 'AIzaSyA2kDKEdWA-jIcAbxi9S8Ugt6-yryKWWy4'; + // Create a new component. This component should produce // some HTML const App = () => { - return
Hi!
; + return ( +
+ +
+ ); } // Take this component's generated HTML and From a0db63a9b56c430e26bdbe937c49632fd6a894d5 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 21:52:09 -0700 Subject: [PATCH 09/11] change from functional based component to class based component --- src/components/search_bar.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/search_bar.js b/src/components/search_bar.js index f13a3be2e8..ebe18d3563 100644 --- a/src/components/search_bar.js +++ b/src/components/search_bar.js @@ -1,7 +1,9 @@ -import React from 'react'; +import React, {Component} from 'react'; -const SearchBar = () =>{ - return +class SearchBar extends Component{ + render(){ + return ; + } } export default SearchBar; From 3d8ba350e994b37614a12a0470febdb15ad45b34 Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 22:17:54 -0700 Subject: [PATCH 10/11] handle user events --- src/components/search_bar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/search_bar.js b/src/components/search_bar.js index ebe18d3563..20489ce66e 100644 --- a/src/components/search_bar.js +++ b/src/components/search_bar.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; class SearchBar extends Component{ render(){ - return ; + return console.log(event.target.value)}/>; } } From cba3748300be6e518f73a1f9b665251ff6ff1c9b Mon Sep 17 00:00:00 2001 From: versusniubility Date: Mon, 17 Sep 2018 23:03:27 -0700 Subject: [PATCH 11/11] state import --- src/components/search_bar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/search_bar.js b/src/components/search_bar.js index 20489ce66e..4bdef30796 100644 --- a/src/components/search_bar.js +++ b/src/components/search_bar.js @@ -1,6 +1,11 @@ import React, {Component} from 'react'; class SearchBar extends Component{ + constructor(props){ + super(props); + + this.state = {term: ' '}; + } render(){ return console.log(event.target.value)}/>; }