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.

TypeError: Object(...) is not a function

See original GitHub issue

Hi

I upgraded my version (version 8) of React Dropzone and now my code is not working when I upgraded to version 10.


Uncaught TypeError: Object(...) is not a function
    at useDropzone (:8080/main.js:85977)
    at :8080/main.js:85645
    at updateForwardRef (:8080/main.js:81088)
    at beginWork (:8080/main.js:81883)
    at performUnitOfWork (:8080/main.js:83897)
    at workLoop (:8080/main.js:83936)
    at HTMLUnknownElement.callCallback (:8080/main.js:68256)
    at Object.invokeGuardedCallbackDev (:8080/main.js:68294)
    at invokeGuardedCallback (:8080/main.js:68343)
    at replayUnitOfWork (:8080/main.js:83350)
   <Dropzone
                accept="image/jpeg, image/png"
                onDrop={this.onDrop.bind(this)}
                maxSize={1000000}
                getDataTransferItems={evt => fromEvent(evt)}>
                {({ getRootProps, getInputProps, isDragActive }) => {
                  return (
                    <div
                      {...getRootProps()}
                      className={classNames('dropzone', { 'dropzone--isActive': isDragActive })}>
                      <input {...getInputProps()} />
                      {isDragActive ? (
                        <p>Drop files here...</p>
                      ) : (
                        <p>
                          Try dropping some files here, or click to select files to upload. Only
                          jpeg and png images under 1mb will be accepted
                        </p>
                      )}
                      <ImagePreviewContainer item={this.props.item} />
                    </div>
                  );
                }}
              </Dropzone>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
chobo2commented, Apr 5, 2019

Ok, I will check out react > 16.8 got to make sure it can work with IE 11(finding lots of stuff I am upgrading to newest versions just don’t work with IE 11)

1reaction
rolandjitsucommented, Apr 2, 2019

You just need to upgrade to react > 16.8. There are no breaking changes in regards to react, so you should be fine.

Read more comments on GitHub >

github_iconTop 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 >

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