I have created one other component with the name of counter and imported into the index.js but while registering the service worker; it says " Attempted import error: './serviceWorker' does not contain a default export (imported as 'registerServiceWorker')."
so i am trying to learn react for my new project through new videos on youtube but while implementing the react i found this error and i am feeling stucked
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './serviceWorker';
import 'bootstrap/dist/css/bootstrap.css';
import Counter from './components/counter';
ReactDOM.render(<Counter/>. document.getElementById("root"));
export default registerServiceWorker;
import React, { Component } from 'react';
export default class Counter extends Component{
state={}
render(){
// React.createElement
return <h1>Hello Worlds</h1>
}
}