@@ -236,6 +236,16 @@ function createCustomStore() {
236
236
);
237
237
}
238
238
239
+ const [array ] = createSignal ([]);
240
+ const result = mapArray (array, (item , i ) => {
241
+ i ();
242
+ });
243
+
244
+ const [array ] = createSignal ([]);
245
+ const result = indexArray (array, (item ) => {
246
+ item ();
247
+ });
248
+
239
249
```
240
250
241
251
### Valid Examples
@@ -413,6 +423,9 @@ createFoo({ onBar: () => bar() });
413
423
const [bar , setBar ] = createSignal ();
414
424
X .createFoo (() => bar ());
415
425
426
+ const [bar , setBar ] = createSignal ();
427
+ X .Y .createFoo (() => bar ());
428
+
416
429
const [signal , setSignal ] = createSignal (1 );
417
430
const element = document .getElementById (" id" );
418
431
element .addEventListener (
@@ -499,12 +512,6 @@ styled.css`
499
512
color: ${ (props ) => props .color } ;
500
513
` ;
501
514
502
- createCss` color: ${ props .color } ` ;
503
-
504
- styled .createCss `
505
- color: ${ props .color } ;
506
- ` ;
507
-
508
515
function Component () {
509
516
let canvas;
510
517
return < canvas ref= {canvas} / > ;
@@ -544,6 +551,16 @@ function createCustomStore() {
544
551
);
545
552
}
546
553
554
+ function createCustomStore () {
555
+ const [store , updateStore ] = createStore ({});
556
+
557
+ return indexArray (
558
+ // the first argument to mapArray is a tracked scope
559
+ () => store .path .to .field ,
560
+ (item ) => ({})
561
+ );
562
+ }
563
+
547
564
```
548
565
<!-- AUTO-GENERATED-CONTENT:END -->
549
566
@@ -571,5 +588,5 @@ Notes:
571
588
"bubble up" forever, though; as soon as you reach a scope where one
572
589
contained reactive primitive was declared, the current function should
573
590
match a tracked scope that expects a function.
574
- - This rule ignores object and class methods completely . Solid is based on
575
- functions/closures only, and it's uncommon to see methods in Solid code.
591
+ - This rule ignores classes . Solid is based on functions/closures only, and
592
+ it's uncommon to see classes with reactivity in Solid code.
0 commit comments