Replies: 2 comments
-
I'm going to move this one to discussions. But there was some debate here.
As for your questions: You can call action in your components. And you can use it without forms. The latter was very much a design goal. Forms give us progressive enhancement but they are definitely bulkier to deal with. You can set your goal. Using signals global like that is not recommended for SSR generally since you could share state between requests. It's often recommended to use context. Or even jump in the routeData. As I mentioned you can't hoist The idea here isn't so much to use these like API routes but as RPCs for the specific UI you are working on. If you have underly data model/API logic I'd extract it. The real expectation is most would lean towards |
Beta Was this translation helpful? Give feedback.
-
Thank you @ryansolid for taking the time and replying so thoroughly. I always appreciate this from you.
|
Beta Was this translation helpful? Give feedback.
-
Still learning SolidJS and SolidStart. One thing that is confusing me is the name
createRouteAction
. I understandcreateRouteAction
is executed on the client side.Suppose i have I global like button in every page, that doesn't need any input params.
Would this be wrong? Is this not a best practice?
In this situation, this is not a route action, right? Unless I'm misunderstanding the purpose of
createRouteAction
Wouldn't make more sense to just call it
createAction
?While we are at it, is this best practice?
Beta Was this translation helpful? Give feedback.
All reactions