Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Bipon Biswas
Bipon Biswas

Posted on • Edited on

     

How to Setup React Bootstrap

Create new project in reactcreate-react-app project-name.

Step 1:start projectnpm start using this command into terminal.

Now you can install your bootstrap usingnpm i --save react-bootstrap. After you're done you should install bootstrapnpm i --save bootstrap as well.

Okey then after you're done with installing bothreact bootstrap andbootstrap.

You can go to your react folder. Undersrc > index.js. That is your entry point for your web app.

From there you should import bootstrap through this line here

import Bootstrap from `bootstrap/dist/css/bootstrap.css
Enter fullscreen modeExit fullscreen mode

You can save that.

Now you can go to yourapp.js file. It's undersrc as well.

You can import anything bootstrap as an example. I'll just button because it's simple.

import { Button } from 'react-bootstrap'

App.js file

return(  <Button bsStyle='success'> Hello </Button>)
Enter fullscreen modeExit fullscreen mode

Reference -React Bootstrap

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Front End Engineer at Pridesys IT Ltd, a Software company based in Dhaka, Bangladesh.
  • Location
    Dhaka, Bangladesh
  • Joined

More fromBipon Biswas

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp