Material-ui-pickers: Warning: React.createElement: type is invalid -- expected a string

Created on 7 Feb 2018  路  7Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | ^1.0.0-beta.14 |
| material-ui | ^1.0.0-beta.32 |
| React | 15.6.1 |
| Browser | Chrome 63.0.3239.132, FireFox 58.0.1 |
| Platform | Windows 10 |

warning.js:35 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of ModalWrapper.

Steps to reproduce

  1. Use default example

Expected behavior

To display correctly

Actual behavior

Error is produced

Most helpful comment

That's because react 16.2.0 is required: the library uses Fragment

All 7 comments

            <DatePicker
              value={new Date()}
              onChange={() => {}}
            /> 

+1

That's because react 16.2.0 is required: the library uses Fragment

Thanks for the response - perhaps this could be highlighted as a "breaking change". Unfortunately I may not be able to upgrade React just yet - so this might be a show stopper.

@semiautomatix it is highlighted as a breaking change - see https://github.com/dmtrKovalenko/material-ui-pickers/releases/tag/v1.0.0-beta.11

@cherniavskii My apologies, my searches did not bring this change to my attention - hopefully this thread will point others to the solution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lysander picture Lysander  路  3Comments

nicky-dev picture nicky-dev  路  3Comments

katy6514 picture katy6514  路  3Comments

brett-patterson picture brett-patterson  路  3Comments

basselAhmed picture basselAhmed  路  3Comments