solid primitives storage is bug
I can't set value 0 number what is this.
Secondly please fix the types in documentation like this
asdf = (props) {
}
What is this props default type add that to documentation examples it's 2024 you still don't have types....
23 Replies
Where exactly are you seeing docs without types
@gsoutz if you want things to change, you'll have to take the time to help us understand what the issue is, rather than do a drive-by complaint.
everywhere, just read it it's obvious
You'll unfortunately have to be a bit more precise. The reference guide has plenty of type docs. The tutorial, however, does not mix in typescript, as it's not obligatory to use solidjs with it
Adding the layer of typescript complexity forced into every part of the beginners guide would actually force out people with an even harder and significant learning curve.
And, to be fair,
props
is an object with the keys being your attributes, and the values you send it, I'm not sure how it would be typed? If you understand objects in typescript, it should be relatively obviousbro instead of sending wall of text, just fix this and send a PR. fine I will stick to 🤪
Well if you can't dialog like an adult, we're not going to keep this conversation going.
There's nothing we can do for you if you're going to stick with this attitude.
Yeah, I was going to suggest that being a nicer might get you a bit further ahead. Just friendly advice
Besides the Typescript question you had, the "can't set the value 0 number" doesn't really hold true? What exactly can't you set to 0? Because obviously, signals can be set to 0. And obviously I can pass props that are 0, that works fine.
and called with
<Counter start={0} />
, again from the basic example, works perfectly well.
So if you still want help, you're going to have to go beyond the "bro it's broke" level of question.ok let me give you a hint, I am not going to contribute further to this project.
What do you think this line does>
https://github.com/solidjs-community/solid-primitives/blob/main/packages/storage/src/persisted.ts#L171...
And props is here untyped.
GitHub
solid-primitives/packages/storage/src/persisted.ts at main · solidj...
A library of high-quality primitives that extend SolidJS reactivity. - solidjs-community/solid-primitives
You mean the children? You can easily type this with JSX.Element , as per https://docs.solidjs.com/reference/component-apis/children
What you pointed to wasn't the docs. It's solid-primitive, part of the ecosystem, but it's not part of the official core code, or docs, it's community-provided
Sorry for the confusion, my link is about storage bug. Second thing is about solid docs. Two separete things here.
If you want community-provided things to get better, it's up to you to PR it, so you can go do that if you want?
"props is untyped" because props is just an object. A
Record<string, V>
if you will.
As for "storage bug", again, just pointing to source code saying it's not working isn't helpful, you have to actually demonstrate a bug in your own code, so that a developer might be able to reproduce it.
Open an issue in https://github.com/solidjs-community/solid-primitives/issues, perhaps that would yield better resultsthere's even some really nice github features you can leverage to make that easier
Ok.
Please try to be less dismissive of the effort of all your peers, and be less aggressive towards people trying to help you, in the future. It goes a lot smoother that way.
Most people don't like to be angrily talked to in that way, I'm sure you don't either, and I don't know why you think this is appropriate behaviour towards others.
I said please didn't I. bringing software with fundamental bugs in it makes everyone mad.