p2
p2
SSolidJS
Created by p2 on 2/4/2025 in #support
"Show done" in a basic todo list, and handling reactive arrays
Trying to create a basic todo app to get my grips with some basic solid/reactivity principles. So far what I have works, but I have no idea if this is the idomatic way to handle array signals (ie if i'm changing/adding/removing elements the "correct") way. I will post the code as a separate message because it's too long. Additionally, how would I add some kind of filter to hide the tasks marked as done when the checkbox is clicked? I have tried a few approaches but none really did what i wanted.
5 replies
SSolidJS
Created by p2 on 4/24/2024 in #support
equivalent of React.detailedHTMLProps<T>?
Trying to use a webcomponent in my solid project. It says that to interface with React using typescript, I add this to my jsx:
declare global {
namespace JSX {
interface IntrinsicElements {
'math-field': React.DetailedHTMLProps<React.HTMLAttributes<MathfieldElement>, MathfieldElement>;
}
}
}
declare global {
namespace JSX {
interface IntrinsicElements {
'math-field': React.DetailedHTMLProps<React.HTMLAttributes<MathfieldElement>, MathfieldElement>;
}
}
}
What would the solid equivalent of this be? I have this which I hacked together from some other internet sources but It doesn't seem to be working:
declare module "solid-js" {
namespace JSX {
interface IntrinsicElements {
'math-field': HTMLAttributes<MathfieldElement>;
}
}
}
declare module "solid-js" {
namespace JSX {
interface IntrinsicElements {
'math-field': HTMLAttributes<MathfieldElement>;
}
}
}
3 replies