Live data from Hacker News

Solidjs – JavaScript UI Library

solidjs.com

31–40 of 92 posts

Re: Solidjs – JavaScript UI Library

#31
post #29

Something's weird with the playground widget on this landing page. I wanted to make the code section bigger to take a better look but when I drag the slider it just goes up, showing a little sliver of code (around 2 lines). Doesn't make a very good first impression.

I'm confident that's a browser native feature and not something with their code. Are you on Firefox?

Re: Solidjs – JavaScript UI Library

#32

Earlier quoted context omitted.

Properties are proxies, but getters should be used for everything else. Why weren't getters also used for properties?

Props are getters. They are shallow. It are stores that are actual ES proxies. I think the term is used loosely here to suggest that they are wrappers on top of objects. It isn't so much about the specifics but to explain why destructuring should be avoided.

Yes, by getters I was trying to refer to these wrappers.

  const valueGetter = () => props.value;

Re: Solidjs – JavaScript UI Library

#33
post #31
post #29

Something's weird with the playground widget on this landing page. I wanted to make the code section bigger to take a better look but when I drag the slider it just goes up, showing a little sliver of code (around 2 lines). Doesn't make a very good first impression.

I'm confident that's a browser native feature and not something with their code. Are you on Firefox?

I thought about that, but it happened to me on Chrome as well.

Re: Solidjs – JavaScript UI Library

#34
post #28

Earlier quoted context omitted.

Solid author here. Hmm don't see this on Firefox on Windows or on my Macbook air. From what you are describing it's probably the REPL acting up. I wouldn't use that as a measure of performance. SolidJS is a UI library, that is basically a reactive state library first, renderer second. It happens to look like React by choice, since it chooses JSX for its flexible composability and React Hooks resemble reactive primiti…

it wasn't clear if this API is hook-based like react. There is function called useTransition but it's not indicated as a hook, and then in the playground you just call createSignal in a render function and it magically has it own instance? Does that mean you can't call createSignal outside of a component either?

You can put createSignal anywhere. It isn't hooks based. It's reactive like MobX or Vue. Some of the primitives don't have much meaning outside of a render setting. What sets Solid apart is the rendering is just that. It's just `createEffect`s. We just compile JSX to it. See my React Finland talk: https://www.youtube.com/watch?v=2iK9zzhSKo4

Re: Solidjs – JavaScript UI Library

#36
post #29

Something's weird with the playground widget on this landing page. I wanted to make the code section bigger to take a better look but when I drag the slider it just goes up, showing a little sliver of code (around 2 lines). Doesn't make a very good first impression.

Yeah I see the bug. Thanks for reporting. Looks like the code added for re-adjusting has mins set that weren't intended for smaller viewports. This has been a community effort(PR that added the feature: https://github.com/solidjs/solid-playground/pull/43) and we are continuing to improve things.

Re: Solidjs – JavaScript UI Library

#37
I've tried to ask on Remix's discussions, whether the use of SolidJS is possible within their framework, it seems to me from the first glance that porting it won't be a big trouble. It's really going to simplify full-stack development.

Re: Solidjs – JavaScript UI Library

#39

Earlier quoted context omitted.

Props are getters. They are shallow. It are stores that are actual ES proxies. I think the term is used loosely here to suggest that they are wrappers on top of objects. It isn't so much about the specifics but to explain why destructuring should be avoided.

Yes, by getters I was trying to refer to these wrappers. const valueGetter = () => props.value;

It's a fair question. Pre React Hooks I expected the proxy plain object approach to be more common. We definitely want consistency regardless if component consumer passes signal or literal, so I went that way. There are cases like with spreads where they are actual proxies too. But probably could have made all props are functions work and have them work with combination of proxies as well things just didn't play out that way.

Re: Solidjs – JavaScript UI Library

#40

Heck of a library, and its creator, Ryan Carniato, is a very smart engineer who works on both Marko[0] and solidjs. He's really patient and answers my random questions on Twitter pretty reliably, I have to say I appreciate it! The performance that SolidJS eeks out of the DOM is really next level. I think it could use a small augment in the docs about migrating from React to SolidJS, but all around the project is very…

When I go to https://markojs.com in Safari (14.1.2), the CPU load on my MacBook Air goes up above 100%. If I use the Brave browser, the CPU load is closer to 25%. Still too much.
Post reply on HN