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 fetch = require('isomorphic-fetch') | |
const async = require('async') | |
const range = require('ramda').range | |
const url = 'https://api.github.com/search/repositories?q=+language:javascript' | |
const listOccurences = names => { | |
const occurences = {} | |
names.forEach(name => { | |
if (name in occurences) { |
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 fetch = require('isomorphic-fetch') | |
const R = require('ramda') | |
const url = 'https://api.github.com/search/repositories?q=+language:javascript' | |
const listOccurences = names => { | |
const occurences = {} | |
names.forEach(name => { | |
if (name in occurences) { | |
occurences[name] = occurences[name] + 1 |
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> | |
<title>my first elm app</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="app.js"></script> | |
<script> |
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
module Main exposing (..) | |
import Html exposing (button, div, span, text) | |
import Html.Events exposing (onClick) | |
type Action | |
= Increment | |
| Decrement | |
main = |
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
{ | |
"name": "react-redux-counter", | |
"version": "1.0.0", | |
"description": "A simple counter in react+redux", | |
"dependencies": { | |
"react": "^15.0.2", | |
"react-dom": "^15.0.2", | |
"redux": "^3.5.2" | |
}, | |
"devDependencies": { |
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
Show hidden characters
{ | |
"presets": [ | |
"es2015", | |
"react" | |
] | |
} |
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
module Main exposing (..) | |
import Html exposing (button, div, span, text) | |
+ import Html.App as Html | |
main = | |
+ view | |
+ | |
+ view = |
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> | |
<title>simple react+redux counter</title> | |
</head> | |
<body> | |
<div id="app"></div> | |
<script src="bundle.js"></script> | |
</body> | |
</html> |
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
module.exports = { | |
entry: './app.js', | |
output: { | |
path: './', | |
filename: 'bundle.js' | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.js$/, |
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
module Counter exposing (..) | |
import Html exposing (button, div, span, text) | |
main = | |
div [] | |
[ button [] [ text "-" ] | |
, span [] [ text "0" ] | |
, button [] [ text "+" ] |
OlderNewer