-
Notifications
You must be signed in to change notification settings - Fork 1k
Getting error with TypeScript... #51
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
Comments
will get you a free Enterprise account at http://www.digitalsignage.com if you want as tx... :) |
It is definitely not a problem with this library. |
Import it like this: |
Interesting. Apparently TypeScript doesn't provide interop with CommonJS modules. In the meantime, rather than let createStoreWithMiddleware = compose(applyMiddleware(thunk))(createStore)
let store = createStoreWithMiddleware(rootReducer) you can write let store = createStore(
rootReducer,
applyMiddleware(thunk)
) if you use Redux >= 3.1.0. |
OK thanks. I will look forward to the new release. Also SystemJS does not handle the process.env.NODE_ENV correctly if not bundled. A basic redux implementation in Angular2 can be found here: https://github.com/jhades/angular2-redux-store (helped me a lot). |
Sorry to step in but after 1 hour of trying to make Typescript and Redux work together your solution was the only one working @gaearon : let store = createStore(
rootReducer,
applyMiddleware(thunk)
) I don't know if anyone else will find this useful or if this is the right place but that's all I got. The error was this:
When using |
@franleplant Maybe this will help: reduxjs/redux#1937 |
Thanks a lot! I've tried that after reading through the Type definition On Wed, Nov 9, 2016 at 5:11 AM Daniel Lytkin [email protected]
|
@franleplant I'm having the same problem using redux 3.6.0. Your solution works but how to add the devToolsExtension? |
If you have the time, the best thing to do is to report this to On Wed, Nov 23, 2016 at 6:58 PM emzero [email protected] wrote:
|
I've found a way. Leaving it here in case anybody else needs it. const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(rootReducer, {}, composeEnhancers(
applyMiddleware(thunk)
)); |
Hello,
I am getting:
when applying:
import thunkMiddleware from "redux-thunk"
let createStoreWithMiddleware = applyMiddleware(thunkMiddleware)(createStore);
any known issues?
regards
Sean
The text was updated successfully, but these errors were encountered: