1.2.0 • Published 2 years ago

@sarnyaia1/aenscomp-lib v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Create React Library project 1

Log in npm

npm login

Create base project with storybook

  • Create project:
npx tsdx create my-project
  • Choose template : react-with-storybook
  • Test the storybook:
npm run storybook

Publish the npm project

  • Change the package name (package.json)

  • Publish the package:

npm publish --acces public

Update the library

  • Change index.tsx (src/index.tsx)

  • Make some comment and refresh version (major,minor,patch)

npm version minor -m "I am updating the library"
  • Publish again:
npm publish --acces public

Testing the created library

  • Create a new react project:
yarn create react-app testproject
  • Add the new library:
yarn add @sarnyaia1/aenscomp-lib
  • Import the component to the App.js
import { Testcomponent } from '@sarnyaia1/aenscomp-lib';


<Testcomponent yourName="Adam" />
  • Runt the project:
yarn start

Result

This is a screenshot

1.2.0

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago