React UI Library Structure, Storybook and Tests

React UI Library Structure, Storybook and Tests

Jack Herrington

2 года назад

49,281 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@alansantos9661
@alansantos9661 - 23.09.2023 09:02

I did clone the repo and run pnpm test, but I'm getting the follow error:

Test suite failed to run

Jest encountered an unexpected token

Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.

Anyone could help me pls?

Ответить
@hakuna_matata_hakuna
@hakuna_matata_hakuna - 13.06.2023 00:20

This approach would break things in next13 , you need multiple entry points to avoid components with hooks getting imported together ina server component

Ответить
@dazecm
@dazecm - 11.03.2023 14:13

I'm having gnarly problems getting Storybook working with a Next.js 13 project with pnpm or npm. It only seems to be less gnarly when using Yarn. As a web dev noob these paint-points are super annoying :/

Ответить
@Zenexis
@Zenexis - 08.03.2023 16:36

I have 1 question, why do we even need index.ts inside AppShell?

Ответить
@somewonderfulguy
@somewonderfulguy - 28.01.2023 16:48

Very interesting, I noticed Cyrillic letters on your screen :)

Ответить
@Foreversun33
@Foreversun33 - 11.01.2023 10:54

Hey Jack, what Tool use you for screendrawing?

Ответить
@AssFaceNFT
@AssFaceNFT - 19.11.2022 22:09

My guy, great to see you again! 🙏🏻😅

Ответить
@DioArsya
@DioArsya - 19.11.2022 07:20

100000/100 of greatness

Ответить
@acidhauss7018
@acidhauss7018 - 25.10.2022 00:44

My favorite React teacher - just when you think you've learned enough, there's always so much more to learn and improve on. Greetings from London :)

Ответить
@jerryzhang7022
@jerryzhang7022 - 15.10.2022 00:36

谢谢!

Ответить
@cristhiangutierrez7996
@cristhiangutierrez7996 - 06.10.2022 22:05

What about the tree shaking when you build the UI? it will bring all components exported in index.ts on first JS load ?

Ответить
@myway9602
@myway9602 - 29.09.2022 08:02

Can you tell me what plugin you used to get hints when writing the code?

Ответить
@marcoscarlomagno3065
@marcoscarlomagno3065 - 14.09.2022 04:58

All your content is so clear and cool. Thank you for it. Im a 4 yrs exp. developer (I guess I'm just starting my career) and I see you as the person I want to be in the future. Calmed, nice and enjoying sw development. Taking care of yourself and the others.

Btw, I think the first unit test is flaky tobethruty() will pass even when the array is empty

Ответить
@abderrahmandouara9973
@abderrahmandouara9973 - 11.09.2022 03:30

I am having a problem when I wrap my components with React.memo, the props and component name don't get to set correctly, any ideas?

Ответить
@sinilyou
@sinilyou - 22.08.2022 11:38

Good for me . Thx

Ответить
@Fitzpa14
@Fitzpa14 - 03.08.2022 23:10

Just tried running npx storybook init in the packages/ui directory and it didn't blow up! Looks like that fixed that.

Ответить
@andrepadez
@andrepadez - 01.08.2022 16:28

Great! Now, how do we publish a UI Library from this to NPM? Thanks

Ответить
@vpetryniak
@vpetryniak - 29.07.2022 16:31

pnpx I deprecated, use pnpm exec instead :)

Ответить
@sergeykahnwald6640
@sergeykahnwald6640 - 21.07.2022 14:36

Storybook is a cool package) But there are some cases when we don’t need all the power of storybook, but just a simple “test page” with all our components where we can play with its props. There is one package that works just fine for this, called storybox-react

Ответить
@abderrahmandouara9973
@abderrahmandouara9973 - 10.07.2022 22:26

As of the release of React 17, there's no need to import React in react components anymore, for reference, look for: Introducing the New JSX Transform on the official react blog

Ответить
@abderrahmandouara9973
@abderrahmandouara9973 - 10.07.2022 13:09

Amazing!

What is the difference between pnpm and npm?

Ответить
@jessedeleon1195
@jessedeleon1195 - 06.07.2022 01:00

Is it possible to keep storybook in its own separate package, and keep stories colocated with their respective components in other packages?

Ответить
@aakashkathait8328
@aakashkathait8328 - 30.06.2022 18:39

Can you please make a video on fetching data in next js from express server with a db

Ответить
@captnoplan3926
@captnoplan3926 - 29.06.2022 13:16

Great video! What's the link for video you mentioned at the beginning for this Movies project? Is it the 'Micro front-end - Shared State' video?

Ответить
@igor_cojocaru
@igor_cojocaru - 28.06.2022 10:27

How about atomic design? How would you structure the library? Will you separate it in folders (atoms, molecules, organisms) or just keep the file structure the same and separate it visually in the Storybook with "title: 'Organisms/Card" for example?
Thank you Jack!

Ответить
@TheKluVerKamp
@TheKluVerKamp - 26.06.2022 18:10

Amazing stuff as usual

Ответить
@jubalm
@jubalm - 26.06.2022 17:12

You are a life saver! This is just so timely as I was about to abandon the monorepo (pnpm) setup having failed to setup Storybook. Really love your style of teaching, please don't get tired creating content. Much ❤ from 🇵🇭

Ответить
@gabriellavoro1495
@gabriellavoro1495 - 26.06.2022 15:26

You have a very nice way to explain things. It would have helped me a lot to have someone like yourself to teach advanced concepts in such an easy to understand way.

Ответить
@omriterem6448
@omriterem6448 - 25.06.2022 10:23

Brilliant work Jack! Thanks for your videos especially in these difficult times. I really appreciate the time and effort you put into making content. Hope everything is getting better at home. Take care and get well soon to your wife 🙏🙏🙏

Ответить
@avi7278
@avi7278 - 24.06.2022 22:34

Pro tip: you're already creating stories with the correct or example props set. Instead of importing the component directly into your tests and addingprops there again, import the story component to avoid dupe code!

Ответить
@dgcp354
@dgcp354 - 24.06.2022 16:14

thanks for the continent, I pray for your family

Ответить
@none0n
@none0n - 23.06.2022 20:42

Another beautiful video as always. I noticed that you didn't test the Storybook code, is that possible or needed?

Ответить
@Sameer_Kumar
@Sameer_Kumar - 23.06.2022 20:15

Hi jack

I think you can extend this amazing tutorial with a part containing proper guidance for build step as a npm package. I find there’s scarcity of quality materials on this topic. Rollup will be a good choice for you to demo with, unfortunately it’s pretty messed up especially for typescript.

Ответить
@WikiPeoples
@WikiPeoples - 23.06.2022 06:33

Jack, are you retired? How do you have the time to research all of these videos, produce them, etc... Seems like a lot of work on top of a day job!

Ответить
@alisonhj
@alisonhj - 23.06.2022 01:41

Thanks a lot! I've been in love with your videos since the 1st one I watched!

Keep up with the excellent work!

Ответить
@betelgeus2029
@betelgeus2029 - 23.06.2022 00:52

Thanks Jack! You are doing wonderful!

Ответить
@user-ux3cp4kr6r
@user-ux3cp4kr6r - 22.06.2022 22:18

Jack, how are you? Thank you for the video!

Ответить
@danialakabani2771
@danialakabani2771 - 22.06.2022 20:44

Man I wish I can be half cool as you when I work, what’s this highlighter tool you are using with a pen I would very much like to have one =D

Ответить
@lukmanblemka3652
@lukmanblemka3652 - 22.06.2022 16:14

Hey jack,hope you are doing okey,how is your wife doing ?

Ответить
@monuxt
@monuxt - 22.06.2022 15:06

Hi sir please help please give your content I have some problem please fixed it's 😔

Ответить
@tkroll
@tkroll - 22.06.2022 14:37

How about SolidJS with Storybook next?

Ответить
@carlosricardoziegler2650
@carlosricardoziegler2650 - 22.06.2022 09:42

So nice Video :) thanks for sharing. I am usina vitest nos, if is possível can you creste a vídeo with Vitest? Thanks Jack :)

Ответить
@bythealphabet
@bythealphabet - 22.06.2022 07:39

NICE, the video I asked for in Discord .😁

Awesome.

Ответить
@phuocquang2314
@phuocquang2314 - 22.06.2022 06:18

Hi sir, thank you so much for the video, but I think it'll be great if you put the starter and the finish code on the repo
I think it's now only the completed code, a little bit hard to follow step by step
Sorry for my bad English
Thank you very much for the video, I learned from you a lot

Ответить
@carlosclaro114
@carlosclaro114 - 22.06.2022 02:42

Great video! In your component folder structure would you have a types file in the same place?

Ответить
@ts3798
@ts3798 - 21.06.2022 23:47

watching this makes me feel like a complete beginner. Haha...

Ответить
@julianklumpers
@julianklumpers - 21.06.2022 23:45

Good to see you are back! hope everything is fine.

Ответить