Skip to content

Instantly share code, notes, and snippets.

Avatar
👌

Jalal Fathi JaySunSyn

👌
  • Planet Earth | Amsterdam | Vienna | Bali
View GitHub Profile
View redux-reselect.html
<script src="../../node_modules/reselect/dist/reselect.js"></script>
<script>
(() => {
const getTodos = (state) => {
return state.todo.todos;
};
const todos = Reselect.createSelector([getTodos],
(todos) => {
@JaySunSyn
JaySunSyn / todo-list.html
Last active Jan 17, 2018
Redux Polymer Todo Tutorial Step-1
View todo-list.html
<link rel="import" href="../bower_components/polymer/polymer-element.html">
<link rel="import" href="../bower_components/polymer/lib/elements/dom-repeat.html">
<link rel="import" href="redux/redux-mixin.html">
<dom-module id="todo-list">
<template>
<ul>
<template is="dom-repeat" items="[[todos]]" as="todo">
<li on-click="_remove">[[todo.text]] <span style="color: white">Remove</span></li>
@JaySunSyn
JaySunSyn / redux-mixin.html
Last active Jan 17, 2018
Redux Polymer Todo Tutorial Step-1
View redux-mixin.html
<link rel="import" href="../../bower_components/polymer/polymer-element.html">
<link rel="import" href="../../bower_components/polymer-redux/polymer-redux.html">
<script>
const initialState = {
todos: [
{text: 'Buy Veggies'},
{text: 'Buy Fruits'},
{text: 'Buy Pizza'},
],