solid-docs icon indicating copy to clipboard operation
solid-docs copied to clipboard

todo: add example showing all differences with React, to drive home dependency-tracking reactivity

Open trusktr opened this issue 3 years ago • 0 comments

Conversation from https://discord.com/channels/722131463138705510/722131463889223772/967330684630863902

One thing missing from the docs is an example that blows React dev's minds. Basically an example that shows the impossibilities of React, and why Solid is so much better. Like this:

https://playground.solidjs.com/?hash=-2041718781&version=1.3.13

It shows createSignal and createEffect outside of a component (in React, using useState or useEffect outside of a component is impossible), and this also eliminate the needs for a 3rd-party external system. Solid's primitives themselves are a state system regardless if you use them in a component or not.

It shows outside state being used inside of a component, just the same as using state that is created inside of a component.

It shows how component function bodies do not re-run: the scope of a function is re-usable and reliable, unlike with React Hooks.

I still see people come into the Solid community and take a quick looks, and totally glaze over these details that make Solid by far better than React.

trusktr avatar May 24 '22 17:05 trusktr