-
-
Notifications
You must be signed in to change notification settings - Fork 15.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is plain object fix #305
Closed
michalkvasnicak
wants to merge
73
commits into
reduxjs:master
from
michalkvasnicak:is-plain-object-fix
Closed
Is plain object fix #305
michalkvasnicak
wants to merge
73
commits into
reduxjs:master
from
michalkvasnicak:is-plain-object-fix
Conversation
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
Naming: * “Stateless Stores” are now called reducers. (#137 (comment)) * The “Redux instance” is now called “The Store”. (#137 (comment)) * The dispatcher is removed completely. (#166 (comment)) API changes: * <s>`composeStores`</s> is now `composeReducers`. * <s>`createDispatcher`</s> is gone. * <s>`createRedux`</s> is now `createStore`. * `<Provider>` now accepts `store` prop instead of <s>`redux`</s>. * The new `createStore` signature is `createStore(reducer: Function | Object, initialState: any, middlewares: Array | ({ getState, dispatch }) => Array)`. * If the first argument to `createStore` is an object, `composeReducers` is automatically applied to it. * The “smart” middleware signature changed. It now accepts an object instead of a single `getState` function. The `dispatch` function lets you “recurse” the middleware chain and is useful for async: #113 (comment). Correctness changes: * The `dispatch` provided by the default thunk middleware now walks the whole middleware chain. * It is enforced now that raw Actions at the end of the middleware chain have to be plain objects. * Nested dispatches are now handled gracefully. (#110) Internal changes: * The object in React context is renamed from <s>`redux`</s> to `store`. * Some tests are rewritten for clarity, focus and edge cases. * Redux in examples is now aliased to the source code for easier work on master.
Breaking changes: s/atom/store
…menter Modify test case ID generation for reducer changing
Discovered a subtle and confounding bug with composeMiddleware where it only works if dispatch is the last argument. It did not combine multiple middlewares into a single middlewares as advertised; it only combined multiple middlewares with dispatch to create a new dispatch. This didn't come up earlier because the codebase never happened to use it in the former way. This commit fixes the issue and adds a test for it.
…into breaking-changes-1.0
Added test for shallowEqualScalar in connect decorator
Dispatch sends action through entire middleware chain
…compose Compose applyMiddleware dispatch once.
Flow types, take 3 (actually 4)
- Symbols are a good way to ensure uniqueness of your action types - In Chrome and Firefox, a symbol inside of a template literal throws an error. Making the string conversion explicit gets rid of the error
npm tasks
Remove Flow types for now
Allow es6 symbols to be used as action types
Add JSDoc annotations to the public API
…s instead of prototypes (did not work from iframes because Object in iframe is not the same as in parent)
Ah, wrong branch, sorry :( |
The PR should probably be done against |
…e plain object from another realm is checked
This was merged as #306. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
isPlainObject
is called between two different contexts thenObject.prototype
is not the same. Now it is comparing only stringifiedconstructors
. Fixes #304