Cov txheej txheem:

Yuav ua li cas kuv khiav phau ntawv dab neeg teb li cas?
Yuav ua li cas kuv khiav phau ntawv dab neeg teb li cas?

Video: Yuav ua li cas kuv khiav phau ntawv dab neeg teb li cas?

Video: Yuav ua li cas kuv khiav phau ntawv dab neeg teb li cas?
Video: Yuav ua li cas thiaj khiav dim lub ntiajteb no 2024, Hlis ntuj nqeg
Anonim

Qhov no tau teeb tsa los ntawm Storybook thaum lub sijhawm teeb tsa tsis siv neeg (Storybook 5.3 lossis tshiab dua)

  1. Kauj Ruam 1: Ntxiv kev vam meej. Ntxiv @ phau ntawv dab neeg / teb .
  2. Kauj ruam 2: Ntxiv ib tsab ntawv npm. Tom qab ntawd ntxiv NPM tsab ntawv hauv qab no rau koj lub pob.json txhawm rau pib lub phau ntawv dab neeg hauv qab no hauv phau ntawv qhia:
  3. Kauj ruam 3: Tsim cov ntaub ntawv tseem ceeb.
  4. Kauj Ruam 4: Sau koj cov dab neeg.

Dhau li ntawm no, koj siv phau ntawv dab neeg Nrog kev xav li cas?

  1. Installation ntawm Storybook. Cov 2 kab code yuav nruab Storybook hauv koj qhov React project: cd my-project-directory.
  2. Knobs ntxiv-on. Lub hom phiaj: Kho koj cov khoom tiv thaiv hauv lub sijhawm tiag tiag hauv Storybook.
  3. Storyshots ntxiv-on. Lub Hom Phiaj: Ntxiv qhov kev sim tsis siv neeg Jest snapshot rau tag nrho koj cov dab neeg.
  4. Nyiaj tshwj xeeb: qee cov lus qhia ntxiv.

Ib yam li ntawd, koj tus tswv teb yuav ua li cas? Host lub React raws lub vev xaib pub dawb nrog Firebase Hosting thiab txuas nrog koj tus kheej kev cai sau

  1. Kauj ruam 1: Tsim ib qhov project tshiab hauv Firebase Console.
  2. Kauj ruam 2: Download tau thiab nruab Node.js.
  3. Kauj Ruam 3: Nruab yarn node pob.
  4. Kauj ruam 4: Tsim React App tshiab.
  5. Kauj ruam 5: Nruab firebase-cov cuab yeej npm pob.

Ntawm no, dab tsi yog storybook rau react?

Phau ntawv dab neeg yog ib qho cuab yeej qhib rau kev tsim UI cov khoom hauv kev sib cais rau Teb , Vue, and Angular. Nws ua rau kev tsim cov UIs zoo nkauj thiab ua haujlwm tau zoo. Pib Saib video. Ua rau. Teb.

Kuv yuav pib phau ntawv dab neeg li cas?

Qhov no tau teeb tsa los ntawm Storybook thaum lub sijhawm teeb tsa tsis siv neeg (Storybook 5.3 lossis tshiab dua)

  1. Kauj Ruam 1: Ntxiv kev vam meej. Ntxiv @storybook/react.
  2. Kauj ruam 2: Ntxiv ib tsab ntawv npm. Tom qab ntawd ntxiv NPM tsab ntawv hauv qab no rau koj lub package.json txhawm rau pib phau ntawv dab neeg tom qab hauv phau ntawv qhia no:
  3. Kauj ruam 3: Tsim cov ntaub ntawv tseem ceeb.
  4. Kauj Ruam 4: Sau koj cov dab neeg.

Pom zoo: