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.

invalid return type

See original GitHub issue

I can provide more info as needed.

Using react-redux v6.0.0 react v16.6.0 I received this error.

“Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.”

I followed the boilerplate implementation like below.

import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import rootReducer from './reducers'
import App from './components/App'

const store = createStore(rootReducer)

render(
  <Provider store={store}>
    <App />
  </Provider>,
  document.getElementById('root')
)

console reported the error occurred in the return from var permanentRegister

switching to react-redux v5.1.1 fixed the problem

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Dec 14, 2018

Seems like a bug to me. Following the documentation exactly throws an error. Changing versions (and nothing else) fixed the error. Presumably you have a bug in the new version, or it’s incompatible.

0reactions
mackermediacommented, Dec 14, 2018

😞 I tried re-creating in a fresh Rails app with Webpacker, but failed. 🤷‍♂️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return bool gives error "Invalid return type" for Ajax Controller
I want to call this controller through Ajax and have it return true or false. the methods all work correctly, ...
Read more >
Flow action - Invalid return type encountered - ServiceNow
When running a flow if you receive following error Invalid return type encountered, check the following. 1.
Read more >
Room: "Invalid return type for a type converter" - Stack Overflow
I added the following type converter to store BibleRef fields as Ints: class Converters { @TypeConverter fun bibleRefToInt(ref: BibleRef?)
Read more >
InvalidReturnType - Documentation - Psalm
InvalidReturnType. Emitted when a function's signature return type is incorrect (often emitted with InvalidReturnStatement ).
Read more >
Invalid Return Type Analyzer - Enlightn
This analyzer scans your application code to ensure that the return type of your methods and functions match their signature.
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