TypeError: Object is not a function
See original GitHub issueWhen running example code in my RN app I get:
import memoize from 'proxy-memoize'
const fn = memoize(obj => ({ sum: obj.a + obj.b, diff: obj.a - obj.b }))
=>
For some reason that import notation results in .deafult
being still present:
If I do memoize.deafult(...)
TS complains, but it works.
Am I importing it wrong? Or could it be something React Native specific? Hermes?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
JavaScript "Uncaught TypeError: object is not a function ...
Try to have the function body before the function call in your JavaScript file.
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >TypeError: Object(...) is not a function · Issue #14484 - GitHub
What is the current behaviour? I have created react functional component and implement state full logic using useState method but it throws an ......
Read more >How to Handle JavaScript Uncaught TypeError: “x” is Not a ...
The Javascript error TypeError: "x" is not a function occurs when there is an attempt to call a function on a value or...
Read more >JavaScript: Uncaught TypeError: n is not a function
This error occurs if you try to execute a function that is not initialized or is not initialized correctly. This means that the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Published: https://www.npmjs.com/package/proxy-memoize/v/0.3.5
Hi folks, A proper fix came to my mind. #25 Please see https://ci.codesandbox.io/status/dai-shi/proxy-memoize/pr/25 and find “Local install instructions”. Let me know if it fixes the issue.