Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Use required context parameter for InitialStateType #132

Merged
merged 3 commits into from
Jun 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ A function that gets initial state asynchronously without triggering actions. Op
###### Types

```flow
type InitialState = () => Promise<State> | State
type InitialState = (ctx: Context) => Promise<State> | State
```

---
Expand Down
2 changes: 1 addition & 1 deletion src/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import type {Token, Context} from 'fusion-core';

import type {ReactReduxServiceType} from './types.js';

type InitialStateType<TState> = (ctx?: Context) => Promise<TState> | TState;
type InitialStateType<TState> = (ctx: Context) => Promise<TState> | TState;

export const ReduxToken: Token<ReactReduxServiceType> = createToken(
'ReduxToken'
Expand Down