walid
walid
SSolidJS
Created by walid on 8/9/2023 in #support
Components moved away from DOM
2 replies
SSolidJS
Created by walid on 7/30/2023 in #support
Type conditional Syntax between props
Hey folks, is there any way to check if IOperation['content'] is of type string since JSX.Element extends from string too ? But like in a way that we know for sure that IOperation['ctx'] will def be defined ?
export interface IOperation {
content: JSX.Element
ctx?: (value: number) => void
}

/// ...
// `operation.ctx` possibly null here
if (tyepof operation.content !== 'number') return operation.ctx(operations.indexOf(operation))
// ...
export interface IOperation {
content: JSX.Element
ctx?: (value: number) => void
}

/// ...
// `operation.ctx` possibly null here
if (tyepof operation.content !== 'number') return operation.ctx(operations.indexOf(operation))
// ...
I'm just asking a type conditional syntax here to make IOperation['ctx'] not optional only if content is of type number
6 replies
SSolidJS
Created by walid on 7/30/2023 in #support
SWC Support for SolidJS
Reading vitejs's docs, I've came across SWC and I'm wondering if this could be achievable using this: https://github.com/modderme123/swc-plugin-jsx-dom-expressions I also stumbled upon a github feed discussion where they stated that SSR and refs are not supported, please let me know 🙏
30 replies
SSolidJS
Created by walid on 7/21/2023 in #support
Warning on a reactive variable using TSX
3 replies