Reputation: 11
I'm trying to use the Accordion component from react-bootstrap
but I'm getting the following errors:
Line 22:18: 'Accordion' is not defined react/jsx-no-undef
Line 23:22: 'Card' is not defined react/jsx-no-undef
Line 24:26: 'Card' is not defined react/jsx-no-undef
Line 25:26: 'Accordion' is not defined react/jsx-no-undef
Line 25:47: 'Button' is not defined no-undef
Line 29:26: 'Accordion' is not defined react/jsx-no-undef
Line 30:26: 'Card' is not defined react/jsx-no-undef
Line 33:22: 'Card' is not defined react/jsx-no-undef
Line 34:26: 'Card' is not defined react/jsx-no-undef
Line 35:26: 'Accordion' is not defined react/jsx-no-undef
Line 35:47: 'Button' is not defined no-undef
Line 39:26: 'Accordion' is not defined react/jsx-no-undef
Line 40:26: 'Card' is not defined react/jsx-no-undef
Any suggestions or guides of how to make it work?
Upvotes: 1
Views: 1971
Reputation: 576
if you have installed react bootstrap from npm and made the configurations that react bootstrap gives you. when you use react bootstrap component into some component or view you have to import theirs elements, in this case:
import {Accordion, Card, Button} from 'react-bootstrap';
then you should use the component. i hope this work for you
Upvotes: 2