Create an NPM Package from a React Component

Create an NPM Package from a React Component

Yurko Turskiy

4 года назад

38,219 Просмотров

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


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

@ravikiransunray
@ravikiransunray - 18.09.2023 12:11

very helpful thank you

Ответить
@benphamvan3456
@benphamvan3456 - 25.07.2023 04:08

So useful

Ответить
@sharkman8560
@sharkman8560 - 21.07.2023 16:24

When I tried to npm run build Error: error:0308010C:digital envelope routines::unsupported I cant fix this error

Ответить
@pranupranav6279
@pranupranav6279 - 07.06.2023 11:26

Thanks❤😊

Ответить
@jackjackdev
@jackjackdev - 09.03.2023 05:31

Finally!! THX :)))

Ответить
@ArdyAryan
@ArdyAryan - 07.02.2023 01:00

Dude, it was fast, clean and to-the-point! thanks!

Ответить
@craftzki8784
@craftzki8784 - 02.10.2022 20:54

I do react but I still don't know babel and webpack. do we need them to create an package

Ответить
@Bostathelink
@Bostathelink - 01.10.2022 04:47

thanks my brother! this help me a lot!!!

Ответить
@rutwikwaghmare499
@rutwikwaghmare499 - 16.08.2022 23:25

Thank You So much...Really helped a lot

Ответить
@ujjavalsinha9889
@ujjavalsinha9889 - 15.03.2022 08:42

Is there a particular order that needs to be followed when executing these commands? Because, I tried the same, but i am getting "Invalid Hook Error"

Ответить
@alaminhowlader36
@alaminhowlader36 - 21.10.2021 14:16

thank you so much

Ответить
@paolahinostroza6659
@paolahinostroza6659 - 11.09.2021 23:54

gracias!! sos un genio

Ответить
@vic9380
@vic9380 - 02.05.2021 11:11

What if there is Java code for native Android component? How do we include Java code into npm package too? I meant in React Native, not simply React.

Ответить
@harshthosar8600
@harshthosar8600 - 18.03.2021 11:58

Great tutorial man, Thanks it helped me alot.

Ответить
@damnitrahul
@damnitrahul - 23.02.2021 14:09

Hey, Thanks for the tutorial. Straight forward and quick!

Ответить
@zrebrutibreniti
@zrebrutibreniti - 26.01.2021 13:41

thanks alot this was really helpful :)

Ответить
@vismal2007
@vismal2007 - 28.12.2020 01:38

Thank You!

Ответить
@wadewilson955
@wadewilson955 - 22.12.2020 19:02

Hey Yurko, ty for the video!
Can you pls explain why do we have to link react from application/node_modules and is there any way to avoid it?

Ответить
@Aakashsingh28
@Aakashsingh28 - 15.12.2020 20:01

how to create package react application as jar?

Ответить
@yt_amarjit
@yt_amarjit - 03.12.2020 09:52

I faced a small error. Had to include peerDepedencies in modules package.json file.

"peerDependencies": {
"react": "^17.0.1",
"react-dom": "^17.0.1"
},

Ответить
@restuwahyusaputra7764
@restuwahyusaputra7764 - 05.11.2020 05:12

Awesome , thanks very helpful for me

Ответить
@balledachandrahas8326
@balledachandrahas8326 - 22.10.2020 19:47

I am getting error : Uncaught ReferenceError: React is not defined. What to do in such case?

Ответить
@kmeeraj
@kmeeraj - 28.09.2020 13:05

Thank you dude!!! from Hyderabad, India. God Bless you

Ответить
@yitzchaksviridyuk932
@yitzchaksviridyuk932 - 23.09.2020 23:32

Thanks you so much for this tutorial man. I'm still really new to react and npm, so I mostly followed along. I still need to study this stuff in depth, but with your help, I was able to publish my first useful npm package!
Thanks again from your 18th subscriber. 😉👍

Ответить
@dd3715
@dd3715 - 19.09.2020 13:50

Can I do this with whole react app (App.js) and its components and dependencies?

Ответить
@zeeshanashraf429
@zeeshanashraf429 - 27.08.2020 17:13

My Question is That when i Develope React library than is it any platform where i Publish Library except Npm bcz if publish in Npm than Library Files also visible in Application and i dont want to show any file.
Just tell me any platform or way .
I shall be very thankful to you.
Thanks

Ответить
@josemanuelserranoamaut4264
@josemanuelserranoamaut4264 - 04.07.2020 08:34

Thankyou! Amazing and short video!
It worked! I followed all the steps and I published some react components.

Ответить
@rishiprasad5699
@rishiprasad5699 - 29.06.2020 21:15

When I try to import my component into another project, I get the following error

// importing as follows
import ComponentName from "package-name"
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
My entrypoint component is exported as default (export default ComponentName). I am not sure why this is happening

Ответить
@hongoSalvaje17
@hongoSalvaje17 - 31.05.2020 22:40

Thanks!

Ответить
@liamlababidi8311
@liamlababidi8311 - 22.05.2020 18:13

To avoid any future error I believe you should also install @babel/plugin-proposal-class-properties and edit your .babelrc file like so
npm install @babel/plugin-proposal-class-properties --save-dev
.babelrc
{
"presets": [
"@babel/preset-env",
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
]
}

Ответить
@RAJESHKUMAR-jh6bq
@RAJESHKUMAR-jh6bq - 11.05.2020 12:05

I've done this but getting module not found error

Ответить
@semicolon5023
@semicolon5023 - 06.05.2020 14:09

Thanks

Ответить
@user-qd4yg6vj9k
@user-qd4yg6vj9k - 26.04.2020 14:13

Doesn`t work

Ответить
@naiz4005
@naiz4005 - 25.04.2020 20:51

Thx. Will try it

Ответить
@Ali-mc4le
@Ali-mc4le - 24.04.2020 01:39

I have love for your skills brother... hope you continue making helpful videos like this! You got a new subscriber :)

Ответить
@alessandromuraro6610
@alessandromuraro6610 - 14.04.2020 13:38

Thanks, nice tutorial

Ответить
@sureshbabu3239
@sureshbabu3239 - 19.02.2020 09:21

It's saved my time :)

Ответить
@Pavan-yb6vm
@Pavan-yb6vm - 15.12.2019 11:31

Thanks mate, really helped!!!

Ответить
@dmitryast1120
@dmitryast1120 - 12.12.2019 23:27

Good job!

Ответить