cerealklr
cerealklr
SSolidJS
Created by cerealklr on 3/23/2024 in #support
How do you preserve reactivity across package boundaries?
I've spent most of the day trying every way I could think of to resolve an issue where my components stopped reacting to signal updates when I refactored them into a separate library. The components render fine, they just never receive updates. If I copy the exact code back into the main application package, it behaves as expected. The parent application is being built with vite and the vite-preset-solid plugin. The component library package is npm linked into the application. Here are a few of the methods I attempted that seem like they should have worked: - Using tsup with the solid preset to produce raw JSX files and configure the package exports - Attempting to directly import the tsx files from the library package - Using vite and tsconfig path aliasing to point directly to the tsx files in the component library's repo directory. - symlinking the component library's src folder into a subfolder of my application package's src folder and importing the TSX files from where. I'm sure there's something I'm missing in the build pipeline that's somehow preventing solid from seeing the JSX, but I can't for the life of me figure out what it is or what other steps I could take to investigate further. Any help or advice much appreciated!
10 replies
SSolidJS
Created by cerealklr on 8/16/2023 in #support
Resource chaining and other promise-like composition
With raw Promises, there are a number of ways to compose them usefully, e.g. .then() for value transformation, Promise.all() for orchestration, etc. Scanning through the docs, I wasn't able to find anything similar for resources. That means that if I have a higher-order caching library that returns Resources, there's no way to functionally compose those results. Am I missing something? If not, is this something I can provide a wrapper for as a user without breaking solid's reactivity model? Or barring that, is this reasonable to consider as a feature request?
2 replies