Skip to content

Commit 0d5c79a

Browse files
committed
Rename "atom" to "state"
1 parent 24d3c10 commit 0d5c79a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

examples/actions/CounterActions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export function increment() {
77
}
88

99
export function incrementIfOdd() {
10-
return (dispatch, atom) => {
11-
if (atom.counter % 2 === 0) {
10+
return (dispatch, { counter }) => {
11+
if (counter % 2 === 0) {
1212
return;
1313
}
1414

examples/containers/CounterApp.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { Component } from 'react';
1+
import React from 'react';
22
import { Injector } from 'redux';
33
import Counter from '../components/Counter';
44
import * as CounterActions from '../actions/CounterActions';
@@ -7,7 +7,7 @@ export default class CounterApp {
77
render() {
88
return (
99
<Injector actions={CounterActions}>
10-
{({ atom: { counter }, actions }) =>
10+
{({ state: { counter }, actions }) =>
1111
<Counter counter={counter} {...actions} />
1212
}
1313
</Injector>

examples/containers/TodoApp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class TodoApp {
88
render() {
99
return (
1010
<Injector actions={TodoActions}>
11-
{({ atom: { todos }, actions}) =>
11+
{({ state: { todos }, actions}) =>
1212
<div>
1313
<AddTodo {...actions} />
1414
<TodoList todos={todos} {...actions} />

src/Injector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ export default class Injector extends Component {
5353
this.performAction.bind(this, actionCreator)
5454
);
5555

56-
return children({ atom, actions });
56+
return children({ state: atom, actions });
5757
}
5858
}

src/addons/inject.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import React from 'react';
22
import Injector from '../Injector';
33
import getDisplayName from '../utils/getDisplayName';
44

5-
function mergeAll({ props, atom, actions }) {
6-
return { ...props, ...atom, ...actions };
5+
function mergeAll({ props, state, actions }) {
6+
return { ...props, ...state, ...actions };
77
}
88

99
export default function inject(
@@ -25,9 +25,9 @@ export default function inject(
2525
);
2626
}
2727

28-
renderChild({ atom, actions }) {
28+
renderChild({ state, actions }) {
2929
const { props } = this;
30-
const childProps = getChildProps({ props, atom, actions });
30+
const childProps = getChildProps({ props, state, actions });
3131

3232
return <DecoratedComponent {...childProps} />;
3333
}

0 commit comments

Comments
 (0)