Material-UI AppBar causes invalid tag error

一个人想着一个人 提交于 2019-12-24 07:26:10

问题


I'm trying to insert AppBar into my component. While all other material-ui components work fine, this one causes the following error:

Uncaught Error: Invalid tag: /f7f7800bcef3562e6f4df1583b20797b.js
at invariant (bundle.js:724)
at validateDangerousTag (bundle.js:47303)
at new ReactDOMComponent (bundle.js:47330)
at Object.createInternalComponent (bundle.js:20522)
at instantiateReactComponent (bundle.js:21633)
at instantiateChild (bundle.js:46812)
at bundle.js:46839
at traverseAllChildrenImpl (bundle.js:21875)
at traverseAllChildrenImpl (bundle.js:21891)
at traverseAllChildrenImpl (bundle.js:21891)

That is a piece of code with AppBar:

import React, { Component } from 'react';
import { List, ListItem } from 'material-ui/List';
import AppBar from 'material-ui/AppBar';

    class Contacts extends Component {
    render() {
        return (
            <div>
                <AppBar title="title"/>
                <List>
                    <ListItem primaryText="text" secondaryText="text"/>
                </List>
            </div>
        );
    }
}

export default Contacts;

When i remove <AppBar ... /> everything works fine.

These are my dependecies:

"dependencies": {
 "axios": "^0.15.3",
"events": "^1.1.1",
"font-awesome": "^4.7.0",
"material-design-icons": "^3.0.1",
"material-ui": "^0.17.0",
"react": "^15.4.0",
"react-dom": "^15.4.0",
"react-router": "^3.0.2",
"react-tap-event-plugin": "^2.0.1",
"roboto-fontface": "^0.7.0",
"rxjs": "^5.1.1"
},
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.3.2",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"css-loader": "^0.26.1",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"file-loader": "^0.10.0",
"html-webpack-plugin": "^2.28.0",
"webpack": "^2.2.1",
"webpack-dev-server": "^2.3.0"
}

The same error occurs when i try to use compoents from pre-built SVG Icon set.

来源:https://stackoverflow.com/questions/42469589/material-ui-appbar-causes-invalid-tag-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!