Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
typing CreateResource - SolidJS
S
SolidJS
•
3y ago
•
43 replies
akerbeltz
typing CreateResource
I would like to do something like this so typescript don
't show an error when using it in jsx
:
const
[data
,
{ mutate
}
]
= createResource
<
{ dataExample
: string
}
| undefined
>
(
(
)
=
>
getData
(
"
/api
/Example
"
)
)
;
So i can do
:
<p
>
{data
(
)
?
.dataExample
}
<
/p
>
SolidJS
Join
Solid is a declarative reactive Javascript library for creating user interfaces.
12,274
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
createResource
S
SolidJS / support
14mo ago
Stores & CreateResource
S
SolidJS / support
2y ago
Complex createResource management
S
SolidJS / support
15mo ago
Redirect in createResource
S
SolidJS / support
16mo ago