You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|[svelte/prefer-destructured-store-props](https://ota-meshi.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/)|destructure values from object stores for better change tracking & fewer redraws |:bulb:|
298
298
|[svelte/require-optimized-style-attribute](https://ota-meshi.github.io/eslint-plugin-svelte/rules/require-optimized-style-attribute/)| require style attributes that can be optimized ||
299
299
|[svelte/require-stores-init](https://ota-meshi.github.io/eslint-plugin-svelte/rules/require-stores-init/)| require initial value in store ||
Copy file name to clipboardExpand all lines: docs/rules/prefer-destructured-store-props.md
+4-3
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,19 @@
2
2
pageClass: "rule-details"
3
3
sidebarDepth: 0
4
4
title: "svelte/prefer-destructured-store-props"
5
-
description: "Destructure store props for more efficient redraws"
5
+
description: "destructure values from object stores for better change tracking & fewer redraws"
6
6
---
7
7
8
8
# svelte/prefer-destructured-store-props
9
9
10
-
> Destructure store props for more efficient redraws
10
+
> destructure values from object stores for better change tracking & fewer redraws
11
11
12
12
-:exclamation: <badgetext="This rule has not been released yet."vertical="middle"type="error"> **_This rule has not been released yet._** </badge>
13
+
-:bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
13
14
14
15
## :book: Rule Details
15
16
16
-
This rule reports on directly accessing properties of a store containing an object. These usages can instead be written as a reactive statement using destructuring to allow for more granular change-tracking and reduced redraws in the component.
17
+
This rule reports on directly accessing properties of a store containing an object in templates. These usages can instead be written as a reactive statement using destructuring to allow for more granular change-tracking and reduced redraws in the component.
17
18
18
19
An example of the improvements can be see in this [REPL](https://svelte.dev/repl/7de86fea94ff40c48abb82da534dfb89)
0 commit comments