question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

weird TypeError with TypeScript on createStore func

See original GitHub issue

Given the following implementation

image

I got this err: Uncaught TypeError: redux_zero_1.default is not a function

I look a little bit on the bundle settings and I found that the main file which is served by default isn’t on UMD format:

"main": "dist/redux-zero.js",

because of this:

image

I don’t have too much knowledge about this. I’ll keep looking but I need your help on this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
matheusmlcommented, Nov 12, 2017

Thanks for this @k1r0s

With React is the same thing with TypeScript. You can check out the Provider from Redux Zero and see how we import React:

import * as React from "react"

If you read this thread, it seems that this is how TypeScript works.

I’ll update the Docs.

0reactions
k1r0scommented, Nov 12, 2017

https://github.com/k1r0s/rzero-imports-tmp here is the code, thanks in advantage

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found