react-loading-bar
react-loading-bar copied to clipboard
Failed to compile
It shows : ./~/react-loadingbar/src/js/components/index.js Module parse failed: /media/arham/FUN AND MULTIMIDIA/react/acro4tech/node_modules/react-loadingbar/src/js/components/index.js Unexpected token (37:6) You may need an appropriate loader to handle this file type. | | return( |
| { show ?
| <div
This error occurred during the build time and cannot be dismissed.
my code:
import React from 'react';
import ReactDOM from 'react-dom';
import LoadingBar from 'react-loadingbar';
class Loadbar extends React.Component {
constructor() { super(); this.state = { progress: 0, progress: 100, direction: 'right' } }
render(){ return( <LoadingBar id="loadingbar-id" className="custom loading-bar className" progress={ this.state.progress } direction={ this.state.direction } /> ) }
// Callback errorDone(){ this.setState({ error: false }) }
progressDone() { this.setState({ progress: 0 }) }
}