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.

Error: MonthInput.render() doesn't return something proper

See original GitHub issue

Uncaught Error: MonthInput.render(): A valid React element (or null) must be returned. You may have returned undefined, an array or some other invalid object. at invariant (invariant.js:42) at ReactCompositeComponentWrapper._renderValidatedComponent (ReactCompositeComponent.js:828) at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:361) at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:257) at Object.mountComponent (ReactReconciler.js:47) at ReactDOMComponent.mountChildren (ReactMultiChild.js:240) at ReactDOMComponent._createInitialChildren (ReactDOMComponent.js:699) at ReactDOMComponent.mountComponent (ReactDOMComponent.js:524) at Object.mountComponent (ReactReconciler.js:47) at ReactCompositeComponentWrapper.performInitialMount (ReactCompositeComponent.js:370) at ReactCompositeComponentWrapper.mountComponent (ReactCompositeComponent.js:257) at Object.mountComponent (ReactReconciler.js:47) at ReactDOMComponent.mountChildren (ReactMultiChild.js:240) at ReactDOMComponent._createInitialChildren (ReactDOMComponent.js:699) at ReactDOMComponent.mountComponent (ReactDOMComponent.js:524) at Object.mountComponent (ReactReconciler.js:47)

I use it the exact same basic way it was recommended in here. Any idea what might be causing this?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
kpheaseycommented, Apr 9, 2018

@wojtekmaj I’m seeing this problem with v6.10 using React v15.6.1 still

1reaction
deboviscommented, Mar 7, 2018

Same issue using React 15.6.1 with example from README.md

@wojtekmaj

import DatePicker from 'react-date-picker';

class MyApp extends Component {
  state = {
    date: new Date(),
  }

  onChange = date => this.setState({ date })

  render() {
    return (
      <div>
        <DatePicker
          onChange={this.onChange}
          value={this.state.date}
        />
      </div>
    );
  }
}

Read more comments on GitHub >

github_iconTop Results From Across the Web

Valid React element not being returned from render method
When I return a simple div with Hello World inside it from my render() method, it returns fine and gets displayed. I logged...
Read more >
Online Return Tips: How to Return Online Orders - FedEx
Returning an item you bought online doesn't need to be a hassle. These four tips help make online returns quick and easy, so...
Read more >
HTML DOM Document addEventListener() Method - W3Schools
Definition and Usage. The addEventListener() method attaches an event handler to a document. ; Syntax. document.addEventListener(event, function, Capture) ...
Read more >
<input>: The Input (Form Input) element - HTML
This attribute has no effect on input types that do not return numeric or text data, being valid for all input types except...
Read more >
html date input only month and year
Syntax HTML type attribute Report Error Forum About. ... Working With The New HTML5 "Month" Input Types Attribute In Your Apps. If you've...
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