This will give you complete intellisense and type safety within your app and CSS modules
🚨 NOTE
- refactoring className from ts file wont update your css/scss className, to change class names you have to change it within your
.module.scss
file
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 = { |
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> |
import {Action, ActionCreator, Dispatch} from 'redux'; | |
import {ThunkAction} from 'redux-thunk'; | |
// Redux action | |
const reduxAction: ActionCreator<Action> = (text: string) => { | |
return { | |
type: SET_TEXT, | |
text | |
}; | |
}; |
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' |
transitionTo
method.routeTo
event, with the same semantics
as transitionTo
, only that it's an event that routes can respond
to.routeTo
handler which
passes its args to an internal transitionTo
.routeTo
event event.:: 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. |