This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Search from "../../components/Search"; | |
class SearchContainer extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: "", | |
articles: [] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
const SearchResult = props => { | |
return ( | |
<ul> | |
<li> | |
<a href={props.result.webUrl} target="_blank"> | |
{props.result.webTitle} | |
</a> | |
</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import SearchResult from "../SearchResult"; | |
const Search = props => { | |
return ( | |
<div> | |
<h1>The Guardian Search App</h1> | |
<form onSubmit={props.handleSubmit}> | |
<input | |
type="text" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import SearchResult from "../SearchResult"; | |
const Search = props => { | |
return ( | |
<div> | |
<h1>The Guardian Search App</h1> | |
<form onSubmit={props.handleSubmit}> | |
<input | |
type="text" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import SearchResult from "./SearchResult"; | |
export class Search extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: "", | |
articles: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
export class Search extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = { | |
value: "", | |
articles: [] | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebPackPlugin = require("html-webpack-plugin"); | |
const htmlWebpackPlugin = new HtmlWebPackPlugin({ | |
template: "./src/index.html", | |
filename: "./index.html" | |
}); | |
module.exports = { | |
module: { | |
rules: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebPackPlugin = require("html-webpack-plugin"); | |
const htmlWebpackPlugin = new HtmlWebPackPlugin({ | |
template: "./src/index.html", | |
filename: "./index.html" | |
}); | |
module.exports = { | |
module: { | |
rules: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
const Index = () => { | |
return <div>Hello React!</div>; | |
}; | |
ReactDOM.render(<Index />, document.getElementById("index")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const HtmlWebPackPlugin = require("html-webpack-plugin"); | |
const htmlPlugin = new HtmlWebPackPlugin({ | |
template: "./src/index.html", | |
filename: "./index.html" | |
}); | |
module.exports = { | |
module: { | |
rules: [ |
NewerOlder