marcusbuffett
marcusbuffett
SSolidJS
Created by marcusbuffett on 3/29/2024 in #support
createEffect is reactive, JSX isn't
7 replies
SSolidJS
Created by marcusbuffett on 3/29/2024 in #support
createEffect is reactive, JSX isn't
This component is rendered from a <Dynamic>, would that make it lose reactivity somehow? I'm seeing that in the code for Dynamic, the component is rendered inside an untrack() call?
7 replies
SSolidJS
Created by tom1sl on 3/26/2024 in #support
Handling of sensitive information from the front end
in general my approach to this stuff is it's fine that clever users can figure out what your admin UI looks like. As long as they can't actually use it because none of the actions will go through for them on the backend. It would be very difficult to provide admin capabilities in a web app without exposing the code for those capabilities to all users. Best you can do is probably just make it harder for users to discover
3 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
Just tested on my site, works perfectly afaict 🎉 been a pain point and source of weird bugs for a long time, thank you
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
ty 🙏
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
looked up the docs about what's happening with keyed too, seems like exactly what I need
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
niceee, yeah that seems like the ticket
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
so add a couple views, then hit "remove myself", and the console log will show the same issue
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
Ah okay so here's the difference. If there's no view below the current view, the Show callback approach works fine, but when there's a view below, there's the same issue: https://playground.solidjs.com/anonymous/3928f3ef-8155-4e14-beb0-16ed515a916b
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
one sec I'll push up a playground that highlights that with a slightly more realistic example
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
so it is strictly better I guess, but yeah still not in lock-step with the store
14 replies
SSolidJS
Created by marcusbuffett on 1/29/2024 in #support
Having trouble implementing a stack of views because of the lifecycle of <Dynamic>
yeah I went down a similar route, that solves the undefined props problem, but leaves another problem (which is present with the non-Show approach too), where when you add a second view, the first view gets called with the new view's props one time
14 replies
SSolidJS
Created by marcusbuffett on 11/15/2023 in #support
Checking if children exists breaks refs
I really gotta read docs more facepalmz https://www.solidjs.com/docs/latest/api#children That being said, this was surprising and took me hours to figure out, would be great to have some sort of warning for this if possible
3 replies
SSolidJS
Created by marcusbuffett on 9/6/2023 in #support
Can Solid Start export a build folder that would be compatible with Capacitor?
Got so excited when I saw this, but even if I include that, when I run & preview, I get this error: $ROUTE_LAYOUTS is not defined, which is the same as when I run without ssr: false
4 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
could even pass in props and such
11 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
yeah it worked pretty well, only issue was the jsx transpilation
11 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
ah I figured out a solution, just running babel react preset manually on these files before using them, it's hacky but 🤷‍♂️
11 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
so I was thinking something like this?
import solid from "solid-start/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import devtools from "solid-devtools/vite";
import UnoCSS from "unocss/vite";
import { presetUno, presetAttributify } from "unocss";
const unoConfig = {
rules: [["custom-rule", { color: "red" }]],
shortcuts: {
"custom-shortcut": "text-lg text-orange hover:text-teal",
},
presets: [presetUno(), presetAttributify()],
};

// const plugins = [];
export default defineConfig({
plugins: [
devtools({
/* additional options */
autoname: true, // e.g. enable autoname
}),
UnoCSS(unoConfig),
solid(),
react({
include: ["src/landing_page/**/*.{js,jsx,ts,tsx}"],
}),
],
});
import solid from "solid-start/vite";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import devtools from "solid-devtools/vite";
import UnoCSS from "unocss/vite";
import { presetUno, presetAttributify } from "unocss";
const unoConfig = {
rules: [["custom-rule", { color: "red" }]],
shortcuts: {
"custom-shortcut": "text-lg text-orange hover:text-teal",
},
presets: [presetUno(), presetAttributify()],
};

// const plugins = [];
export default defineConfig({
plugins: [
devtools({
/* additional options */
autoname: true, // e.g. enable autoname
}),
UnoCSS(unoConfig),
solid(),
react({
include: ["src/landing_page/**/*.{js,jsx,ts,tsx}"],
}),
],
});
The react include seems to work, as solid stuff keeps working with that included, but there doesn't seem to be an include/exclude option for the solid start plugin?
11 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
also huge thank you for the awesome framework, I've been re-writing my site chessmadra.com in it and it's been such a breath of fresh air, particularly the performance (there's a chessboard that requires snappy updates, solidjs updates were 20x faster than react native), and the state management stuff. Was really cool to replace zustand/immer with creatStore/produce, which slotted in perfectly. JS bundle size is half what it was, and it's sweet how often the answer to "how do I do X in solid" is just like "a variable", or "a plain function", to replace all the useCallback/useMemo/useRef/etc. Haha sorry for the rant, just been so much fun
11 replies
SSolidJS
Created by marcusbuffett on 4/1/2023 in #support
Is there an easy way to render React inside Solid?
ah interesting, yeah so I can get some react rendering by doing createElement manually, but there's a lot of jsx in the sub-components that Index renders, so I guess I'll have to figure out how to get Vite to use the solid plugin for some files, and the react plugin for others? Does that sound about right?
11 replies