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.

redux-form 6.5 with preact throws an error

See original GitHub issue

Hello,

I’m trying to use redux-form with preact but i get this error :

Uncaught TypeError: component.__ref is not a function
    at setComponentProps (component.js:43)
    at renderComponent (component.js:124)
    at renderComponent (component.js:124)
    at renderComponent (component.js:124)
    at setComponentProps (component.js:43)
    at buildComponentFromVNode (component.js:223)
    at idiff (diff.js:91)
    at innerDiffNode (diff.js:233)
    at idiff (diff.js:145)
    at innerDiffNode (diff.js:233)

after digging a little bit I found that the reduxForm has a string “wrappedInstance” as ref.

Any idea how to get redux-form work with preact, or any replacement to it.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
samoudscommented, Feb 23, 2017

Ok I see. Thanks by the way. 😃

1reaction
developitcommented, Feb 21, 2017

You need to use preact-compat for libraries that rely on String refs. Redux Form should work right out of the box with that in place.

Let me know if this solves the issue for you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

redux-form 6.5 with preact throws an error · Issue #554 · preactjs ...
Hello, I'm trying to use redux-form with preact but i get this error : Uncaught TypeError: component.__ref is not a function at setComponentProps...
Read more >
Why is redux-form throwing an error? - Stack Overflow
I am trying to implement redux-form but I am coming across an error and can't seem to fix it or find the correct...
Read more >
redux-form (6.5.0): How to clear form error (_error)?-Reactjs
How to clear the component stored redux state in componentWillUnmount? How to use React refs to focus a Redux Form field? How to...
Read more >
Notices_7_22_2018_Website_O...
defineProperty:function(e,r,p){if(p.get||p.set)throw new ... indexOf(child); if (index === -1) { throw new Error('This child does not exist.
Read more >
uninstall dlrs from our org that is part of the package - You.com
Uninstalling the package . Triggers installed by DLRS can be removed by navigating to the Manage Lookup Rollup Summaries tab in the App....
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