Live data from Hacker News

Solid – A declarative JavaScript library for building user interfaces

github.com

11–20 of 178 posts

Re: Solid – A declarative JavaScript library for building user interfaces

#12
I'm skeptical about the way state can change from under you within the same execution of the rendering function. This type of mutability will prevent all the help that typescript normally gives for complex components.

Also if anyone has used it, do you have to use this pattern if you have derived state?

    setState({
      displayName: `${state.user.firstName} ${state.user.lastName}`
    })
If you simply do `const displayName = ...` in the component, will the component update properly?

Re: Solid – A declarative JavaScript library for building user interfaces

#13
post #11

If your library/framework/etc's goal is to make life slightly better, just don't do it. This just looks like React.

Fair enough. Keep in mind I've been working on this for close to 5 years. Basically around the time I realized KnockoutJS was going to die out and React was for good reason going to win. Here is an article about why this library exists: https://dev.to/ryansolid/why-solidjs-do-we-need-another-js-u...

Re: Solid – A declarative JavaScript library for building user interfaces

#14
post #12

I'm skeptical about the way state can change from under you within the same execution of the rendering function. This type of mutability will prevent all the help that typescript normally gives for complex components. Also if anyone has used it, do you have to use this pattern if you have derived state? setState({ displayName: `${state.user.firstName} ${state.user.lastName}` }) If you simply do `const displayName = .…

Feel free to shoot any issues or discussions on our gitter or reddit. You are correct because it doesn't work like that. It works more like MobX. There is no render function that runs repeatedly. Instead everything is split apart granularity and only those pieces update.

If you want to have derived state. Simply wrap it in a function or use it in a JSX binding.

Ex.

const displayName = () => `${state.user.firstName} ${state.user.lastName}`

return {displayName()};

or:

return {`${state.user.firstName} ${state.user.lastName}`};

or:

// this expensive to calculate:

const displayName = createMemo(() => `${state.user.firstName} ${state.user.lastName}`)

return {displayName()};

Re: Solid – A declarative JavaScript library for building user interfaces

#15
post #11

If your library/framework/etc's goal is to make life slightly better, just don't do it. This just looks like React.

Fair enough. Keep in mind I've been working on this for close to 5 years. Basically around the time I realized KnockoutJS was going to die out and React was for good reason going to win. Here is an article about why this library exists: https://dev.to/ryansolid/why-solidjs-do-we-need-another-js-u...

Don't get me wrong, every technical endeavor is fun and beneficial for the individual.

YOu just have higher chances of staring a unicorn co, than creating a js library that is widely adopted.

Re: Solid – A declarative JavaScript library for building user interfaces

#16
post #15

Earlier quoted context omitted.

Fair enough. Keep in mind I've been working on this for close to 5 years. Basically around the time I realized KnockoutJS was going to die out and React was for good reason going to win. Here is an article about why this library exists: https://dev.to/ryansolid/why-solidjs-do-we-need-another-js-u...

Don't get me wrong, every technical endeavor is fun and beneficial for the individual. YOu just have higher chances of staring a unicorn co, than creating a js library that is widely adopted.

For sure. Which is why in the early years I just did my thing. Win the benchmark battles and move on with my life. But then this whole React Hooks thing came about. And Vue Composition API. Even Svelte 3, and I was like.. there is a better way. I tried to convince those libraries of this but hit walls. So I just kept writing articles and demonstrating it. And here we are today. Some else posted it on here and for the first time I believe it is on the front page of Hacker News. Years later.

Re: Solid – A declarative JavaScript library for building user interfaces

#17
post #15

Earlier quoted context omitted.

Fair enough. Keep in mind I've been working on this for close to 5 years. Basically around the time I realized KnockoutJS was going to die out and React was for good reason going to win. Here is an article about why this library exists: https://dev.to/ryansolid/why-solidjs-do-we-need-another-js-u...

Don't get me wrong, every technical endeavor is fun and beneficial for the individual. YOu just have higher chances of staring a unicorn co, than creating a js library that is widely adopted.

Dude, just let him have his fun and stop with the needless negativity. You don't know what the future holds and being rude for the sake of being rude, says quite a bit about you as a person.

Re: Solid – A declarative JavaScript library for building user interfaces

#18
post #15

Earlier quoted context omitted.

Don't get me wrong, every technical endeavor is fun and beneficial for the individual. YOu just have higher chances of staring a unicorn co, than creating a js library that is widely adopted.

For sure. Which is why in the early years I just did my thing. Win the benchmark battles and move on with my life. But then this whole React Hooks thing came about. And Vue Composition API. Even Svelte 3, and I was like.. there is a better way. I tried to convince those libraries of this but hit walls. So I just kept writing articles and demonstrating it. And here we are today. Some else posted it on here and for the…

Don't let him get you down, mate. These types of people who like tearing other projects down for the sake of it litter the internet.

If you're having fun, keep going. That's all that matters.

Re: Solid – A declarative JavaScript library for building user interfaces

#19

Earlier quoted context omitted.

For sure. Which is why in the early years I just did my thing. Win the benchmark battles and move on with my life. But then this whole React Hooks thing came about. And Vue Composition API. Even Svelte 3, and I was like.. there is a better way. I tried to convince those libraries of this but hit walls. So I just kept writing articles and demonstrating it. And here we are today. Some else posted it on here and for the…

Don't let him get you down, mate. These types of people who like tearing other projects down for the sake of it litter the internet. If you're having fun, keep going. That's all that matters.

> If you're having fun, keep going. That's all that matters.

How is it different than what I said?

Re: Solid – A declarative JavaScript library for building user interfaces

#20
post #15

Earlier quoted context omitted.

Don't get me wrong, every technical endeavor is fun and beneficial for the individual. YOu just have higher chances of staring a unicorn co, than creating a js library that is widely adopted.

Dude, just let him have his fun and stop with the needless negativity. You don't know what the future holds and being rude for the sake of being rude, says quite a bit about you as a person.

I don't think I was being rude in any way. I agree that it is fun. But then its a slim chance that its going to be widely adopted. how come bringing that up is rude?
Post reply on HN