This file contains 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, { Component } from "react"; | |
import axios from "axios"; | |
const DEFAULT_QUERY = "redux"; | |
const DEFAULT_HPP = "100"; | |
const PATH_BASE = "https://hn.algolia.com/api/v1"; | |
const PATH_SEARCH = "/search"; | |
const PARAM_SEARCH = "query="; | |
const PARAM_PAGE = "page="; |
This file contains 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 defaultOpts = { | |
host: "local", | |
name: "user", | |
user: "admin" | |
}; | |
const opts = { | |
host: "local", | |
name: "Dick", | |
user: "Dick", | |
password: "1234" |
This file contains 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
// Первый вариант | |
{list.map(function (item) { | |
return ( | |
# leanpub-start-insert | |
<div key={item.objectID}> | |
# leanpub-end-insert | |
<span> | |
<a href={item.url}>{item.title}</a> | |
</span> | |
<span>{item.author}</span> |
This file contains 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
// | |
//INDEX.JS | |
// | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from 'components/App'; | |
import { Provider } from 'react-redux'; | |
import createStore from './store'; |
This file contains 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
// INDEX.JS | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import AppRouter from 'components/AppRouter'; | |
import getStore from './store'; | |
import { Provider } from 'react-redux'; | |
import { BrowserRouter } from 'react-router-dom'; | |
const store = getStore(); |
This file contains 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
// | |
//app.js | |
// | |
import React, { Component } from "react"; | |
import { helloWorld, List } from "./lets"; | |
class App extends Component { | |
render() { | |
return ( | |
<div className="App"> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.0.8/es5-shim.min.js"></script> | |
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script> |
OlderNewer