snippet reactConnectedRoute "React template" b import React from 'react' import { connect } from 'react-redux' import { isLogin } from 'utils/self' import { Redirect, Route } from 'react-router-dom' export default connect((state, ownProps) => { const { self } = state return { self } })(({ component: Component, ...rest }) => { const { self } = rest return isLogin(self) ? : } /> }) endsnippet snippet reactComponent "React template" b import React, { Component } from 'react' export default class extends Component { render () { } } endsnippet snippet reactConnect "React template" b import component from './component' import { connect } from 'react-redux' export default connect((state, ownProps) => ({ }), { })(component) endsnippet snippet TODO "Javascript Todo" b // TODO: ${1:desc} `echo $USER` `!v strftime("%c")` ${2} endsnippet snippet connect "react redux connect" b export default connect((state, ownProps) => { return { } })($1) endsnippet snippet Card "Default Expandable Card" b endsnippet snippet redux "redux" b export const SET_${1/\w/\u$0/g} = 'SET_${1/\w/\u$0/g}' import {store} from 'redux/store' import {Map} from 'immutable' export default function (${1} = Map({}), action) { // let {$1Id} = action switch (action.type) { case SET_${1/\w/\u$0/g}: return action.$1 default: return $1 } } export function set${1/\w+\s*/\u$0/} ($1) { store.dispatch({ type: SET_${1/\w/\u$0/g}, $1 }) } endsnippet