reactstrap: Spinner is not exported from 'reactstrap'
- components:
Spinner
- reactstrap version
7.0.2
- import method
umd/csj/es
- react version
6.7.0
- bootstrap version
4.2.1
What is happening?
I do
import { Spinner } from 'reactstrap';
and use it in render method like
<Spinner color="primary" />
according to the doc https://reactstrap.github.io/components/spinners/
What should be happening?
I expected view the Spinner component.
I checked node_modules/reactstrap/src/index.js but Spinner is not exported.
Steps to reproduce issue
- setup reactstrap
- in any component, do
import { Spinner } from 'reactstrap';
Error message in console
./src/Auth/Components/SignupForm.js
Attempted import error: 'Spinner' is not exported from 'reactstrap'.
Code
import { Spinner } from 'reactstrap';
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (3 by maintainers)
@tmhn which Bootstrap version are you using? Spinners was added since v4.2.0!
It works fine for me. @Toyurc try to reinstall your dependencies!
rm -rf node_modules && npm i
Here is a basic example. Hope this helps!
https://stackblitz.com/edit/reactstrap-1366?file=Example.js
Solved by running commands:
npm install bootstrap --save
npm install --save reactstrap react react-dom
and thennpm audit fix --force
Spinner not include
_spinners.scss
: https://github.com/reactstrap/reactstrap/issues/1651