An warware: amsa bootstrap kuna buƙatar shigo da kaya

React Bootstrap yana buƙatar shigo da shi don yin aiki.

 all components

No, you don't need to import all components.

Wannan layin lambar kawai yana shigo da ɗakin karatu na React don ku iya amfani da tsarin JSX (JavaScript + XML) da React API.

Menene bootstrap

Bootstrap ɗakin karatu ne na CSS da JavaScript don ƙirƙirar aikace-aikacen gidan yanar gizo na gaba-gaba. Yana ba da saiti na sassa na zamani waɗanda za a iya amfani da su don ƙirƙirar ƙirar al'ada don kowane gidan yanar gizo. Bootstrap yana sauƙaƙa ƙirƙira daidaitaccen ƙira a kan dandamali da yawa, na'urori, da masu bincike.

Bootstrap a cikin React

Bootstrap sanannen ɗakin karatu ne na gaba-gaba don haɓaka masu amsawa, gidajen yanar gizo masu dacewa da wayar hannu. Yana ba da saitin fayilolin CSS da JavaScript waɗanda za a iya amfani da su don ƙirƙirar ƙirar al'ada don gidan yanar gizo.

Don amfani da Bootstrap a cikin React, da farko kuna buƙatar shigar da ɗakin karatu. Kuna iya yin haka ta hanyar gudanar da umarni mai zuwa a cikin tashar ku:

npm shigar - ajiye bootstrap

Da zarar an shigar da Bootstrap, zaku iya haɗa shi a cikin aikinku ta ƙara layin da ke gaba zuwa fayil ɗin index.js:

shigo da 'bootstrap/dist/css/bootstrap.min.css' shigo da 'bootstrap/dist/js/bootstrap.min.js'

Na gaba, kuna buƙatar haɗa da salon Bootstrap a cikin fayil ɗin salon aikin ku. Kuna iya yin haka ta ƙara layin da ke gaba zuwa fayil ɗin index.css:

@import "bootstrap/dist/css/bootstrap.min.css";

Shafi posts:

Leave a Comment