,

Discover JS Built-in Signals in React and Svelte NOW!

Posted by

JS Built-in Signals In React and Svelte TODAY!

JS Built-in Signals In React and Svelte TODAY!

JavaScript has become one of the most popular programming languages in the world, and with good reason. Its versatility allows developers to create dynamic and interactive web applications that provide a seamless user experience. Two popular JavaScript frameworks that have gained significant traction in recent years are React and Svelte.

React

React is a JavaScript library developed by Facebook for building user interfaces. One of the key features of React is its built-in signaling system, which allows developers to manage component communication more effectively. With React’s built-in signals, developers can easily pass data between components and trigger actions based on user interactions.

Svelte

Svelte is a relatively newer JavaScript framework that takes a different approach to building web applications. With Svelte, developers write their code in a declarative manner, and the framework compiles it into highly efficient JavaScript code. Svelte also includes built-in signaling capabilities that make it easy for developers to manage state and communication between components.

Today’s Development Landscape

As web development continues to evolve, it is essential for developers to stay up-to-date with the latest trends and technologies. React and Svelte’s built-in signaling features have become invaluable tools for developers looking to build modern, responsive web applications. By harnessing the power of these frameworks, developers can create dynamic and interactive user experiences that keep users engaged.

Conclusion

React and Svelte are two powerful JavaScript frameworks that offer built-in signaling capabilities for managing component communication. As web development continues to advance, it is crucial for developers to leverage these features to create seamless and efficient web applications. By staying informed on the latest developments in the industry, developers can continue to build innovative and user-friendly web applications that meet the demands of today’s users.

0 0 votes
Article Rating
21 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
@VincentJenks
5 months ago

That looks like a whole mess of gnarly boilerplate, compared to what I'm seeing in Preact signals. I'm excited about this evolution, especially because useEffect is so messy, and you're otherwise left with a myriad of non-standard, third-party options that may not be around for years. Signals brings simplicity and maturity to React, which is desperately needs. I'll wait for the standard to make it into JS and trickle down through all the frameworks.

@WikiPeoples
5 months ago

Such unnecessary complexity.

@dealloc
5 months ago

I'm personally OK with the explicit "get()". No indirections, and clearly tells the user that this is a Signal which will subscribe to any changes and re-run any computed computations.

If you wanted, you could easily build your own function that returns its own API, i.e. like Solid's "createSignal" function, which returns a tuple with a getter and setter similarly to React's useState.

@scholarwang-xp6kg
5 months ago

Hi Jack, I really enjoy your videos and I would also like to share the knowledge you've shared with my friends.

May I have your permission to repost your video? Due to regional network restrictions, I have to download and repost it, but I will credit the original author and indicate that it is for educational purposes only.

I look forward to your response.

@b4bass
5 months ago

Great stuff as always J. I'm hoping you might have a suggestion re: first steps in learning about building a decentralized blockchain – possible project coming and I'm definitely not "up to speed" fon this subject,. thanks in advance 🙂

@count_of_pizza
5 months ago

I'm wondering, what do you think about web components and webassembly?

@henriquealmeida348
5 months ago

Why all these `new`? Soon enough people will get tired of writing them. Too verbose for JS!

@deng8263
5 months ago

Can you tell me what the theme of zsh in your vscode? It looks good!

@IngeGallito
5 months ago

Bravo, thanks

@nm6x
5 months ago

@preact/signals-react for ftw!

@products-explorer
5 months ago

It's too complicated, I will wait for the final native version. Angular uses signal and the usage is simpler.

@RifatAraRumey
5 months ago

Omg

@tjvrana6988
5 months ago

Legend state is production ready and is great for react signals

@thespikything
5 months ago

Preact Signals has entered the chat

@ivan.jeremic
5 months ago

I don't like the way signals syntax looks like, if if is a proposal why not take the chance and make a totally new syntax to make it cleaner, Her just an Example:
signal count = 0;
signal double = count * 2;

effect {
console.log("count ", count);
console.log("double", double);
};

@PinheiroJaime
5 months ago

The effect function, in React, is called inside useEffect. Of course, cause there is a "unsubscribe".
BUT… in Svelte example, effect function is called directly and never unsubscribed.
Is this how it is intended, or??

@vilan5980
5 months ago

what zsh theme you are using?

@user-tb4ig7qh9b
5 months ago

I do not see react get signals in recent days the problem is the reason for that the reactive model of react is about re-evalute the component this mean of you want to opt-out you need to use useMemo useCallback memo other framework you need to opt-in so signals for react it is like useState

@bumbletastic
5 months ago

I'm definitely going to push that into prod right now

@CarlosAlexisG
5 months ago

Fantastic video ❤