Loading
Build a TypeScript Project From Scratch Tutorial (19 exercises)
Lesson

Use Library in Production

In this lesson, you will use your library in production in a React app.

Resources

The following resources provide more information for this lesson:

Transcript

[0:00] [0: 00] Now, it's time to test out our library in production. Open up the code, sandbox template, and Fork it. Go to your dependencies and import your package. Then go into App.tsx. Once you fix this, you'll see that it's working.
[0:14] [0: 14] You may see this error, and this usually means that the types aren't published. I double-checked in a different IDE. It is working as expected. This is probably an issue with codeSandbox. You can see here I created a test directory and it's installed the package.

[0:30] [0: 31] When you import it here in our regular IDE, like VS code, you'll see that we get this information. If you right-click, Go to Type Definition, you'll see it's referencing the index.d.ts file with our types. We know that the types are being published.