https://serverless-stack.com/ logo
#help
Title
# help
b

Bjorn Theart

05/20/2022, 11:33 AM
Have anyone used, and perhaps have examples, of a SolidJs SPA + SST? setup
t

thdxr

05/20/2022, 12:03 PM
I'm a big solidjs guy!
It's not really any different than react in terms of using it with sst
b

Bjorn Theart

05/20/2022, 12:06 PM
Dax, would I set that up with the https://docs.serverless-stack.com/constructs/ViteStaticSite construct?
t

thdxr

05/20/2022, 12:06 PM
Yep that's right
b

Bjorn Theart

05/20/2022, 12:07 PM
oh, good! This will get me going. Thanks so much
You know what makes it really hard to not use React? — it’s the massive ecosystem and projects like https://mantine.dev that helps developers like me who’s design chops aren’t really chops at all 😛
t

thdxr

05/20/2022, 12:16 PM
I was afraid of that initially
To be fair it doesn't have something like mantine
But literally for anything else it hasn't been much of an issue. Especially with solid-primitives
The UI kit thing might be a blocker but solid is so amazing otherwise! Really hard for me to overstate how much cleaner my code is and how simple it is to be working with normal js again
b

Bjorn Theart

05/20/2022, 12:18 PM
I’m gonna be brave and give it a shot
d

Devin

05/20/2022, 12:19 PM
I haven't used solid but can you plug tailwind in? It makes getting something to look "good" super straightforward.
Tailwind doesn't solve the accessible autocomplete date picker problem but does look clean.
b

Bjorn Theart

05/20/2022, 12:22 PM
I read a good articles the other day where a strong case was made against using UI/Components libs; initially it gets you out of the blocks really quick, but it could slow you down when you get to a point where you need a custom UI suited for you Saas, side-project whatever. The flip side of this; building on good UI primitives initially gets you out of the blocks slower, but when you want those customisation the UI primitives doesn’t get in your way like the complete UI/Components frameworks
t

thdxr

05/20/2022, 12:22 PM
That's been my experience. External UI libraries are actually too flexible so they're not as nice to use (tons of props, too much styling freedom)
Your internal component library will be a lot more opinionated
And therefore way more productive
And styling + customization is done on a lower level
b

Bjorn Theart

05/20/2022, 12:24 PM
@Devin for sure. Tailwind is great. Having used it for quite some time I’m still not use to the looong class attribute generated in your html. I know you can use
@apply
but that feels awkward to me
d

Devin

05/20/2022, 12:25 PM
Yeah like everything, tradeoffs. I generally try to lean towards themes for HTML/CSS and rolling my own components. That kinda gets me in the middle of, fast, looks good, let's me eject.
b

Bjorn Theart

05/20/2022, 12:25 PM
I like that
t

thdxr

05/20/2022, 12:30 PM
I use Stitches for styling with solid
I actually wrote the adapter for solid
b

Bjorn Theart

05/20/2022, 12:39 PM
t

thdxr

05/20/2022, 12:41 PM
yeah it works but....unfortunately stitches is being rewritten to support static extraction and the team has been really unommunicative
so I wonder if it's going to die
I really love the stitches pattern so if it does I'll write my own solution
b

Bjorn Theart

05/20/2022, 12:46 PM
I’ve had my eye on stitches, but lost interest because at the time I was a die hard Svelte fanboy and didn’t want to use the non-react way of using Stitches
Is Sass still a thing these days?
d

Devin

05/20/2022, 1:03 PM
Sure! It's less useful now that CSS has variables but go for it.
b

Bjorn Theart

05/20/2022, 1:18 PM
@thdxr I’m running into the following error using SolidJs and Vitest when running
yarn test
Copy code
TypeError: __vite_ssr_import_0__.fileURLToPath is not a function
I bootstrapped my SolidJs app using
npx degit solidjs/templates/ts-vitest frontend
t

thdxr

05/20/2022, 1:19 PM
hm haven't run into that but also haven't setup vitest with solid yet
b

Bjorn Theart

05/20/2022, 1:19 PM
are you using some other testing framework, then?
t

thdxr

05/20/2022, 1:20 PM
I plan to use vitest I just don't really do unit tests on the frontend much
was using cypress for e2e but wanted to checkout playright
b

Bjorn Theart

05/20/2022, 1:27 PM
thanks 🙂