- No longer encourage/allow external calls to a Route's
transitionTo
method. - Instead, make use of a new
routeTo
event, with the same semantics astransitionTo
, only that it's an event that routes can respond to. - ApplicationRoute will have a default
routeTo
handler which passes its args to an internaltransitionTo
. - URL changes will be converted into a
routeTo
event event.
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
:: Windows / Vagrant ssh snippet | |
:: Gotcha: Calling "ssh" from the windows CMD.exe requires Cygwin installed and | |
:: added to the PATH. This allows me to use the ssh port, but does not | |
:: require that I run this batch through Cygwin. | |
:: Notes: | |
:: The Vagrant convenience "vagrant ssh" doesn't work on windows. | |
:: One is left to manually ssh into the virtual box, which can be cumbersome. |
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
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
export PATH="/usr/local/opt/python/bin:$PATH" | |
export GPG_TTY=$(tty) | |
# export START="$HOME/a" | |
# if [[ $PWD == $HOME ]]; then | |
# cd $START | |
# fi | |
# alias ls='ls -F --color --show-control-chars' |
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 {Action, ActionCreator, Dispatch} from 'redux'; | |
import {ThunkAction} from 'redux-thunk'; | |
// Redux action | |
const reduxAction: ActionCreator<Action> = (text: string) => { | |
return { | |
type: SET_TEXT, | |
text | |
}; | |
}; |
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 from "react"; | |
import ReactDOM from "react-dom"; | |
import { AppContainer } from "react-hot-loader"; | |
import App from "./App"; | |
const render = (hydrate = false) => { | |
const container = document.querySelector("#app"); | |
const element = ( | |
<AppContainer> |
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 { ActionCreator } from 'redux' | |
import { ThunkAction } from 'redux-thunk' | |
import { WebService } from 'app/services/WebService' | |
// Create this reusable type that can be imported into your redux action files | |
export type ThunkResult<R> = ThunkAction<R, RootState, Services, RootAction> | |
// Services are only necesarry because we are using | |
// `reduxThunk.withExtraArgument({ webService }))` when we are creating our store. | |
export type Services = { |