reed
reed
Explore posts from servers
SSolidJS
Created by reed on 11/15/2023 in #support
confused on rendering issue
const [selectedFile, setSelectedFile] = createSignal<File | null>(null)

return (
<div>
<input type="file" onChange={handleFileChange} />
{selectedFile() && <p class="text-red-500">File selected: {selectedFile()!.name}</p>}
</div>
)
const [selectedFile, setSelectedFile] = createSignal<File | null>(null)

return (
<div>
<input type="file" onChange={handleFileChange} />
{selectedFile() && <p class="text-red-500">File selected: {selectedFile()!.name}</p>}
</div>
)
the <p> element is not rendering. i inspected the element in dev tools and it doesn't exist, nor are the styles being applied, or anything.
4 replies