Getting Started
摘要
Let’s suppose for a moment that you’ve spent any time developing with frameworks such as React. In that case, I’m sure you will have come across the principle of creating web components. We can drop these self-contained, reusable packages of code into any number of projects, with only minor tweaks needed to configure the package for your project. Sound familiar? What if we found ourselves reusing them over multiple projects? The problem is that using React means you are stuck with React components – what if we could create one that is framework-agnostic? We can, with Svelte, and it’s a perfect call to build a web component library! In this chapter, I’ll take you through what web components are and an overview of the Cobalt library, which is what we will create, so we can get set up to begin to create web components using Svelte.