In my react and typescript app, I use: onChange={(e) => data.motto = (e.target as any).value}.
How do I correctly define the typings for the class, so I wouldn't have to hack my way around the type system …
How to import CSS modules in Typescript with Webpack?
Generate (or auto-generate) .d.ts files for CSS? And use classic Typescript import statement? With ./styles.css.d.ts:
import * as styles from './styles.css'
Import using require Webpack function?
…
I have the following piece of code, which receives a history object as prop:
const ChildComponent = ({ history }) => (
<div className={styles.body}>
<div className={styles.cta}>
<FloatingActionButton onClick={() => history.push(routes[4].path)}>
<…