Reputation: 7
I am getting this error: I could really use some help
Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
This is my code below for Index.js
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(<App />, document.getElementById('root'));
App.js
import React from 'react';
import "./App.css";
import Header from './components/Header';
import Users from "./components/users.css";
function App() {
return (
<div className="App">
<Header />
<Users />
</div>
);
}
export default App;
Upvotes: 0
Views: 64
Reputation: 52367
Looks like you're trying to import a component named Users
, but are referencing a CSS file instead. Change your import Users
line to reflect that actual path to the Users
component.
Upvotes: 1