Creating NPM Package with React TypeScript
/
Modularizing TypeScript Codebase
Modularizing TypeScript Codebase
https://leanpub.com/creating-npm-package-with-react-typescript
1. Identify Independent Elements
https://leanpub.com/creating-npm-package-with-react-typescript
2. Split the Elements You Want to Extract into Their Separate Modules
https://leanpub.com/creating-npm-package-with-react-typescript
TweetButtonPropsType.types.tsx
https://leanpub.com/creating-npm-package-with-react-typescript
generateStarIcons.ts
https://leanpub.com/creating-npm-package-with-react-typescript
3. Import the Extracted Elements into the
TweetButton.tsx
File
https://leanpub.com/creating-npm-package-with-react-typescript
4. Configure Jest to Strip the Extension from Import Statements
https://leanpub.com/creating-npm-package-with-react-typescript
5. Release the Latest Version of the Project
https://leanpub.com/creating-npm-package-with-react-typescript
Up next
Epilogue
In this chapter
Modularizing TypeScript Codebase
1. Identify Independent Elements
2. Split the Elements You Want to Extract into Their Separate Modules
3. Import the Extracted Elements into the TweetButton.tsx File
4. Configure Jest to Strip the Extension from Import Statements
5. Release the Latest Version of the Project