How to create a Typescript npm module

preview_player
Показать описание
Learn how to create a React Native component with Typescript and make it into a npm package.

Links from video:

----
Video Suggestions:

----
Follow Me Online Here:

----
#benawad

----
#benawad
Рекомендации по теме
Комментарии
Автор

Thanks, that helped me to publish my TS package.

Автор

I see the terms “modules”, “libraries”, “packages” thrown around and sometimes used interchangeably. (e.g. npm is a “package” manager but it by default creates a “node_modules” folder) Is there a real difference?

vihardesu
Автор

You might consider putting the @types packages in optionalDependencies, since the code will run just fine without them and just provide better development experience

vojtechstepancik
Автор

Hey Ben - instead of using extends, I might be more self documenting to store the component props in a separate interface like 'interface ParentProps {}, then include all props like 'type Props = ParentProps & ImagePropertiesIOS & ImagePropertiesAndroid & AccessibilityProperties'. Obviously not a big deal, just another way to approach it. Nice work on this btw! Really useful component!

frankcooke
Автор

Adding the @types/react-native also installs react native which conflicts with the react native of main project where we use the package. How can we handle it?

programmingpython
Автор

How do I use CSS (Style.scss) in the package?

psbx
Автор

Not sure if this was a tutorial for your package or to publish a typescript module

rx