Have anyone used, and perhaps have examples, of a ...
# help
b
Have anyone used, and perhaps have examples, of a SolidJs SPA + SST? setup
t
I'm a big solidjs guy!
It's not really any different than react in terms of using it with sst
b
Dax, would I set that up with the https://docs.serverless-stack.com/constructs/ViteStaticSite construct?
t
Yep that's right
b
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
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
I’m gonna be brave and give it a shot
d
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
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
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
@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
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
I like that
t
I use Stitches for styling with solid
I actually wrote the adapter for solid
b
t
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
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
Sure! It's less useful now that CSS has variables but go for it.
b
@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
hm haven't run into that but also haven't setup vitest with solid yet
b
are you using some other testing framework, then?
t
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
thanks 🙂