Skip to content

Instantly share code, notes, and snippets.

View pinglinh's full-sized avatar
🥸
hermit

pinglinh pinglinh

🥸
hermit
  • pinglinh corporation
  • Earth
View GitHub Profile
@pinglinh
pinglinh / index.js
Created March 26, 2018 15:32
Refactoring React components : SearchContainer 1.3.3
import React from "react";
import Search from "../../components/Search";
class SearchContainer extends React.Component {
constructor(props) {
super(props);
this.state = {
value: "",
articles: []
};
@pinglinh
pinglinh / index.js
Last active March 27, 2018 10:46
Refactoring React components : SearchResult 1.3.2
import React from "react";
const SearchResult = props => {
return (
<ul>
<li>
<a href={props.result.webUrl} target="_blank">
{props.result.webTitle}
</a>
</li>
module.exports = {
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader"
}
}