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 { actions, asyncActions, reducer } from './counter'; | |
describe('counter actions', () => { | |
it('increment should create counter/INCREMENT action', () => { | |
expect(actions.increment()).toEqual({ | |
type: 'counter/INCREMENT', | |
}); | |
}); | |
it('decrement should create counter/DECREMENT action', () => { |
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 { actions, asyncActions, reducer } from './counter'; | |
describe('counter actions', () => { | |
it('increment should create counter/INCREMENT action', () => { | |
expect(actions.increment()).toEqual({ | |
type: 'counter/INCREMENT', | |
}); | |
}); | |
it('decrement should create counter/DECREMENT action', () => { |
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 * as React from 'react'; | |
import { Store, createStore, combineReducers, applyMiddleware } from 'redux'; | |
import createSagaMiddleware from 'redux-saga'; | |
import * as ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { reducer as counter, rootSaga } from './counter'; | |
import Counter from './Counter'; | |
const sagaMiddleware = createSagaMiddleware(); |
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 { actions, reducer } from './counter'; | |
describe('counter actions', () => { | |
it('increment should create counter/INCREMENT action', () => { | |
expect(actions.increment()).toEqual({ | |
type: 'counter/INCREMENT', | |
}); | |
}); | |
it('decrement should create counter/DECREMENT action', () => { |
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 * as React from 'react'; | |
import { Store, createStore, combineReducers } from 'redux'; | |
import * as ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux'; | |
import { reducer as counter } from './counter'; | |
import Counter from './Counter'; | |
const store: Store = createStore( | |
combineReducers({ | |
counter, |
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 styled from 'styled-components'; | |
const Title = styled.h1` | |
font-size: 1.5em; | |
text-align: center; | |
color: palevioletred; | |
`; | |
const Wrapper = styled.section` |
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 * as React from 'react'; | |
import * as ReactDOM from 'react-dom'; | |
import Title from './Title'; | |
interface Props { | |
compiler: string; | |
framework: string; | |
} | |
const App: React.SFC<Props> = () => <Title isActive />; |
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'; | |
class Counter extends React.Component { | |
state = { | |
counter: 0, | |
}; | |
handleIncrement = () => { | |
this.setState(state => ({ | |
counter: state.counter + 1, |