SolidJS

S

SolidJS

Solid is a declarative reactive Javascript library for creating user interfaces.

Join

onClick event not appearing in DOM

Hi I have my Popup component as child to my Modal component. I would like to set an onClick event on my Popup component to stop propagation of the click event up to the Modal component. However, the click event does not appear in the DOM at all. I have no clue how to debug this. Does anybody know what is going on? My Popup component: ```js...

How should i render components stored in array?

```js const arr = [<Component props={$prop}>, <ComponentTwo props={$prop}>] return(...

How "beta" is SolidStart?

Hey, sorry for the weird phrasing of the question. I am currently starting a new small customer project and was wondering if it would be worth checking out solidStart for this. However the beta disclaimer (while appreciated) is a bit discouraging. ...

Remove item from store list?

I have tried: ```typescript const itemId = 5; setMainStore( "mylist",...

setstore mutate more than one property in one call

Assume I have a store with a list of objects. Can I write a single call to setStore() (without produce or reconcile) that modifies two or more properties of one or more objects in the array ? In other words, if produce and reconcile already do this, how do they do it ? What do they return that enables them to mutate one object (not replace it, because it causes components with For to be recreated instead of updated) and change two or more properties in one go ?...

Resource refetch doesn't trigger effect

I have this effect in my root layout (solid-start) ```ts const user = useUser(); createEffect(() => {...

Triggering css transition on signal change?

Is that possible? Just when reactive variable gets changed, it would just do simple fade-in.

`@solidjs/router` doesn't seem to work with Capacitor

In my index.tsx, I defined the routing like this ``` <Router> <Routes>...

remove url params using setSearchParams

is there a way to remove a param from an url using setSearchParams?

Invisible solid-icons

I moved my project to a newer version of Astro and all the solid-icons (except the hamburger one which I used for the mobile navbar for some reason) I've used appear in the DOM but are invisible, what might be causing this problem? Is there a way to fix it?

Is it possible to expose a function so it can be called manually via console?

say I want to implement extra functionality on a website without adding extra buttons to the page. how can I expose a function that can interact with signals, etc. and is callable via the browser console or userscript so that users can "hack" the page and make use of that functionality?...

Saving Results of routeData() into a Context

What is the proper way to save the results of routeData() into a context? So, here's my setup. Here's my root. ``` <Body class="bg-primary h-min w-screen"> <div class="text-center mx-auto text-spring pt-4 px-0 w-full">...

useContext returns undefined.

Hey I created a Provider and a context to manage figlet fonts. This provider is just a "singleton"-reference to my FontRegistry. FontProvider + useFonts:...

Confused about resource mutation with `createDeepSignal` and `produce`

Hey folks, I am trying to create a resource which gets updated on a button click, by fetching content from a server. However the user may change parts of the data they have already fetched. When refetching the data, we want to make sure that all user changes are not being overwritten. ...

Iterating routes don't work

For some weird reason the code in this image doesn't work as expected

createResource as initial value with store

Hi, is there a way to combine the behaviour of createResource and createStore? What I essentially want to achieve, is to fetch a resource and populate a store with the data. But since doing something like this with createEffect I was wondering, what the best way to do this would be? Essentially the flow should be:...

Prpc and Suspense question

```js const Stats: ParentComponent = () => { const allStatsPersonal = allStats({ value: "all" }); return (...

Prefill Input with value from a fetch source - Best practice

Hey folks, I am currently trying to prefill an input field with saved user values. I have basically two things I would like to combine: ...

Is there any scenario where batch wouldn't be fully synchronize?

In that once the call to batch(() => { }) completes all signals inside that have been set can be read . i.e. there is no setImmediate/setTimeout/queueMicrotask in the path?