Code Monkey home page Code Monkey logo

按流程引入 浏览器打开时会报Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded about react-read-pdf HOT 3 CLOSED

forthealllight avatar forthealllight commented on May 29, 2024
按流程引入 浏览器打开时会报Uncaught Error: addComponentAsRefTo(...): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render` method, or you have multiple copies of React loaded

from react-read-pdf.

Comments (3)

FriendsA avatar FriendsA commented on May 29, 2024

好像是因为我的react版本是15+导致的,看npm的介绍应该是需要react16+.
请问哪个版本支持react15+呢?

from react-read-pdf.

forthealllight avatar forthealllight commented on May 29, 2024

好像是因为我的react版本是15+导致的,看npm的介绍应该是需要react16+.
请问哪个版本支持react15+呢?

sorry,暂时不支持16.0以下版本的react。

from react-read-pdf.

forthealllight avatar forthealllight commented on May 29, 2024

好像是因为我的react版本是15+导致的,看npm的介绍应该是需要react16+.
请问哪个版本支持react15+呢?

嗯哼,你可以尝试自己修改以下,在component里面的两个组建。

将16.x的组建的生命周期降级到15.x,并且ref的用法也降级。不好意思,当时开发这个npm包的时候

只考虑了react16+的版本,并不兼容15.x及以下,sorry。

from react-read-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.