From a78d8f626f8526d6ed41687e8e9ab222cffbfb9d Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 19 Apr 2023 19:02:52 -0500 Subject: [PATCH] Add note about unref'ing the style prop --- docs/guide/advanced-concepts/creating-features.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/advanced-concepts/creating-features.md b/docs/guide/advanced-concepts/creating-features.md index 5f652941..3aa46be2 100644 --- a/docs/guide/advanced-concepts/creating-features.md +++ b/docs/guide/advanced-concepts/creating-features.md @@ -14,7 +14,7 @@ Because typescript does not emit JS, if a property is supposed to be a function ## Vue Components -Any vue components you write need to do a couple things. Typically they'll need to type any props that come from computed properties appropriately, for which you can use the [processedPropType](/api/modules/util/vue#processedproptype) utility - using it will look something like `style: processedPropType(String, Object, Array)`. You'll also want to make sure to `unref` any of these props you use in the template. The template should make sure to include a `Node` component with the feature's ID. Also, if there are custom displays this feature may have, you'll want to convert the `CoercableComponent` into a Vue component inside the setup function, typically using the [computeComponent](/api/modules/util/vue#computecomponent) or [computeOptionalComponent](/api/modules/util/vue#computeoptionalcomponent) utilities. +Any vue components you write need to do a couple things. Typically they'll need to type any props that come from computed properties appropriately, for which you can use the [processedPropType](/api/modules/util/vue#processedproptype) utility - using it will look something like `style: processedPropType(String, Object, Array)`. You'll also want to make sure to `unref` any of these props you use in the template. `style` is an exception though, where it should actually be unreffed inside the `GatherProps` function or else it won't work with computed refs. The template should make sure to include a `Node` component with the feature's ID. Also, if there are custom displays this feature may have, you'll want to convert the `CoercableComponent` into a Vue component inside the setup function, typically using the [computeComponent](/api/modules/util/vue#computecomponent) or [computeOptionalComponent](/api/modules/util/vue#computeoptionalcomponent) utilities. ## Custom Settings