Aryxst
Aryxst
Explore posts from servers
SSolidJS
Created by sh1man on 3/26/2024 in #support
How to css preloading
What does that even mean
2 replies
SSolidJS
Created by Aryxst on 3/13/2024 in #support
How do i make a list properly reactive to state changes?
I removed types in the first code cuz i couldn't paste for the limit
3 replies
SSolidJS
Created by Aryxst on 3/13/2024 in #support
How do i make a list properly reactive to state changes?
The rendering:
<For
each={data()?.Data.Items.filter(item => {
const conditions: boolean[] = [];
for (const [key, value] of Object.entries(activeFilters())) {
reRenders++;
console.log(key, value);
if (typeof value == 'boolean') {
conditions.push(checkerFunctions[key](item));
} else if (typeof value == 'object') {
conditions.push(filterFunctions[key](item));
}
}
return conditions.every(Boolean);
})}
>
//...
<For
each={data()?.Data.Items.filter(item => {
const conditions: boolean[] = [];
for (const [key, value] of Object.entries(activeFilters())) {
reRenders++;
console.log(key, value);
if (typeof value == 'boolean') {
conditions.push(checkerFunctions[key](item));
} else if (typeof value == 'object') {
conditions.push(filterFunctions[key](item));
}
}
return conditions.every(Boolean);
})}
>
//...
3 replies