Alex Lohr
Alex Lohr
SSolidJS
Created by slainless on 12/10/2024 in #support
How to improve list rendering performance?
Even if you used a memo, the object equality comparison would trigger on a new array. So the solution would be a pattern like
let unchanged = true, previouslyFiltered = [], previousMatched;
const matched = strings.filter((str, i) => {
const filtered = exclude(str);
unchanged = unchanged && previouslyFiltered[i] === filtered;
previouslyFiltered[i] = filtered;
return filtered;
});
const result = unchanged ? previousMatched : matched;
previousMatched = matched;
return result;
let unchanged = true, previouslyFiltered = [], previousMatched;
const matched = strings.filter((str, i) => {
const filtered = exclude(str);
unchanged = unchanged && previouslyFiltered[i] === filtered;
previouslyFiltered[i] = filtered;
return filtered;
});
const result = unchanged ? previousMatched : matched;
previousMatched = matched;
return result;
11 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
One would have to map one AST format to another, which is a bother.
30 replies
SSolidJS
Created by Eatham on 11/25/2024 in #support
Use an action for a form but stay on the same page?
Even if you post a request, the site usually changes to the URL in the action, showing the reply of a POST response.
5 replies
SSolidJS
Created by Eatham on 11/25/2024 in #support
Use an action for a form but stay on the same page?
You either need the page that controls the action to go back to the previous page or to send the form through JS (or both).
5 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
Maybe such a solution will be part of https://oxc.rs/ at some point.
30 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
I think the solution will be something like using porffor to transpile plugin transformers into wasm to run them in a performant way directly from the rust code.
30 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
And context will also not work.
30 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
That is due to solid-js/h supports react-style JSX transforms, but does not create the reactive effects for props changes, so you need to do them manually.
30 replies
SSolidJS
Created by narmia on 6/22/2023 in #support
Anyone one have any insight on how to integrate a Meta/FB Pixel with a SolidStart site?
declare global {
interface Window {
fbq: [insert type here];
}
}
declare global {
interface Window {
fbq: [insert type here];
}
}
14 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
Right, I wanted to extend the type to be more precise, that's a leftover.
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
I think we should at least add a line to document this behavior.
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
It seems you are indeed correct. We need to fix the docs!
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
According to the docs, it isn't.
27 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
Is n really an accessor in this case?
27 replies
SSolidJS
Created by Eve on 10/15/2024 in #support
unwrap doesn't seem to do anything
Chrome console conveniently formats things that look like an array as arrays.
6 replies
SSolidJS
Created by Massukka on 10/16/2024 in #support
&& in <Show> when condition and typescript?
The benefit here is to test something that typescript cannot possibly discern, but you already know is true: that if the condition inside the when-prop is true, the value is present. So it is perfectly OK to use the exclamation mark in that case. Just don't go over board with it.
27 replies
SSolidJS
Created by Eve on 10/15/2024 in #support
unwrap doesn't seem to do anything
If you add something to the store it should become obvious.
6 replies