2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
title: Pattern
|
|
|
|
order: 80
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-19 13:06:33 +01:00
|
|
|
<Example part="docs_overview" options_focus="Pattern">
|
2022-01-19 11:31:39 +01:00
|
|
|
The pattern you create will be a constructor for instances of your pattern
|
|
|
|
</Example>
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
Last but not least, we've arrived at the level of the pattern itself.
|
|
|
|
The pattern is a container that holds all your parts, along with the configuration
|
|
|
|
and the store.
|
|
|
|
|
|
|
|
In reality, your pattern will be a *constructor* that takes the user's settings as
|
|
|
|
input and will return a new instance of your pattern.
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
That pattern instance will have a `draft()` method which will do the actual work of
|
|
|
|
drafting the pattern. Once drafted, you can either call the `render()` method on
|
2021-08-25 16:09:31 +02:00
|
|
|
the pattern instance, or pass it to [our React component](/packages/components) to render it in the browser.
|
2021-10-17 18:26:00 +02:00
|
|
|
|