
Made it work by changing the shallow to mount:

Have to learn the difference of mount vs shallow.
Happy Coding!
render() { return ([ <h1>Hello world!</h1>, <div>Welcome to hot-reloading React written in TypeScript! {this.state.count}</div> ]); }
export interface UserActions extends Action { type: UserKind; payload: UserPayload; }
export interface UserActions extends Action { type: UserKind; payload?: UserPayload; }
export interface UserActions extends Action { type: UserKind; payload: UserPayload; }
export interface StateProps { user: Dto.Client.User; component: Component; counter: Dto.Client.Counter; } export interface ActionProps { routeToUser: UserDispatcher; doCounter: CounterDispatcher; } interface Props extends StateProps, ActionProps { } export type Dispatcher = (action: UserActions | CounterActions) => void; export type UserDispatcher = (action: UserActions) => void; export type CounterDispatcher = (action: CounterActions) => void; export default class ReduxFirstRouterApp extends React.Component<Props, {}> {
const mapStateToProps = ({user, component, counter}: StateProps) => ({user, component, counter}); const mapDispatchToProps = (dispatch: Dispatcher): ActionProps => ({ routeToUser: (action: UserActions) => dispatch(action), doCounter: (action: CounterActions) => dispatch(action) }); this.AppContainer = connect(mapStateToProps, mapDispatchToProps)(ReduxFirstRouterApp);
function greetNoDestructuring(dto: {name: string, favoriteNumber: number}): void { console.log(dto.name); console.log(dto.favoriteNumber); } function greetManualDestructuring(dto: {name: string, favoriteNumber: number}): void { const {name, favoriteNumber} = dto; console.log(name); console.log(favoriteNumber); } function greetInlineDestructuring({name, favoriteNumber}: {name: string, favoriteNumber: number}): void { console.log(name); console.log(favoriteNumber); } greetNoDestructuring({name: 'Kal', favoriteNumber: 7}); greetManualDestructuring({name: 'El', favoriteNumber: 6}); greetInlineDestructuring({name: 'Superman', favoriteNumber: 42});
devServer: { hot: true, proxy: { "/api": "http://localhost:3000" }, historyApiFallback: { index: "/index.html" } }
<base href="/"/>
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `App`
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Provider, connect } from 'react-redux'; const Link = require('redux-first-router-link');
import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { Provider, connect } from 'react-redux'; const Link = require('redux-first-router-link').default;
error: gpg failed to sign the data fatal: failed to write commit object
MacBook-Air:~ jack$ gpg2 --list-secret-keys gpg: can't connect to the agent: IPC connect call failed MacBook-Air:~ jack$ gpg-agent --daemon gpg-agent[1499]: /Users/jack/.gnupg/gpg-agent.conf:2: invalid option
$ cat ~/.gnupg/gpg-agent.conf
pinentry-program /usr/local/bin/pinentry-mac /usr/local/bin/pinentry-mac
pinentry-program /usr/local/bin/pinentry-mac
MacBook-Air:~ jack$ gpg-agent -v --daemon gpg-agent[2012]: listening on socket '/Users/jack/.gnupg/S.gpg-agent' gpg-agent[2012]: listening on socket '/Users/jack/.gnupg/S.gpg-agent.extra' gpg-agent[2012]: listening on socket '/Users/jack/.gnupg/S.gpg-agent.browser' gpg-agent[2012]: listening on socket '/Users/jack/.gnupg/S.gpg-agent.ssh' gpg-agent[2013]: gpg-agent (GnuPG) 2.1.21 started
MacBook-Air:~ jack$ gpg2 --list-secret-keys gpg-agent[2013]: handler 0x70000e9d4000 for fd 7 started /Users/jack/.gnupg/pubring.gpg ------------------------------ sec rsa2048 2016-12-12 [SC]
MacBook-Air:~ jack$ git config --global gpg.program gpg2
server { listen 443 ssl; server_name domain.name.here.com; ssl_certificate /usr/local/etc/nginx/cert.crt; ssl_certificate_key /usr/local/etc/nginx/cert.key; location / { proxy_pass https://127.0.0.1:3000; proxy_set_header host $host; # proxy_connect_timeout 600; # proxy_send_timeout 600; # proxy_read_timeout 600; # send_timeout 600; } }
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/nginx/cert.key -out /usr/local/etc/nginx/cert.crt
const common = protobufjs.loadSync('common.proto'); const ecommerce = protobufjs.loadSync('ecommerce.proto'); const hr = protobufjs.loadSync('hr.proto');
const common = protobufjs.loadSync('common.proto'); protobufjs.loadSync('ecommerce.proto', common); protobufjs.loadSync('hr.proto', common);
const root = protobufjs.loadSync([ 'common.proto', 'ecommerce.proto', 'hr.proto' ]);
module com.anicehumble { export enum Status { PENDING = 0, IN_PROGRESS = 1, COMPLETED = 2 } export interface Task { uuid: com.anicehumble.uuid; ownedBy: string; title: string; status: Status; } }
console.log(com.anicehumble.Status.IN_PROGRESS);
export enum Status { PENDING = 0, IN_PROGRESS = 1, COMPLETED = 2 }
import * as Enums from './the-enums'; module com.anicehumble { export interface Task { uuid: com.anicehumble.uuid; // TypeScript will complain com.anicehumble 'has no exported member uuid' even it is defined in an internal module on a separate file. ownedBy: string; title: string; status: Enums.Status; } }
export const PENDING = 0; export const IN_PROGRESS = 1; export const COMPLETED = 2;
module com.anicehumble { export type Status = 0 | 1 | 2; export interface Task { uuid: com.anicehumble.uuid; ownedBy: string; title: string; status: Status; } }
const t : com.anicehumble.Task = <any>{}; t.status = 2; // http://stackoverflow.com/questions/47882/what-is-a-magic-number-and-why-is-it-bad
import * as TaskStatus from './task-status-enum'; const t : com.anicehumble.Task = <any>{}; t.status = TaskStatus.IN_PROGRESS; console.log(TaskStatus.IN_PROGRESS); // no more undefined error
t.status = 42; // compile error: 42 is not assignable to type Status
const n: number = 42; t.status = n; // compile error: number is not assignable to type Status
const n: number = 2; t.status = n; // compile error: number is not assignable to type Status
export const PENDING : com.anicehumble.Status = 0; export const IN_PROGRESS: com.anicehumble.Status = 1; export const COMPLETED: com.anicehumble.Status = 2;
export enum Status { PENDING : com.anicehumble.Status = 0, IN_PROGRESS: com.anicehumble.Status = 1, COMPLETED: com.anicehumble.Status = 2 }
return this.$http.post( '/great/api/-core/file/jpg', formData, { transformRequest: angular.identity // , headers: { 'Content-Type': undefined } // uncomment this to remove the error: Request Entity Too Large });