Vladimir Kosenko 🤘 zentask.ai Profile picture
Entrepreneur. Engineer. Building SaaS in public. Helping entrepreneurs with MVPs and development. Web3, AI. https://t.co/sIw1Qgk3kR, https://t.co/XMXzbOg7fB & https://t.co/wh3sIWp6sA co-founder.
Mar 23, 2023 9 tweets 2 min read
Hey folks!

Let's talk about server-sent events (SSE) in JavaScript!

SSE is a server technology that allows a web page to get updates from a server in real-time.

It's a great alternative to web sockets for some use cases.

Let's dive in! 🧵 To start using SSE in your JavaScript code, you first need to create a new EventSource object and specify the URL of the server endpoint that will be sending the events.

Here's an example:

const eventSource = new EventSource('/events');
Mar 22, 2023 7 tweets 2 min read
Let's talk about `useDeferredValue` hook from #reactjs 18.

In some cases it could replace `debounce` func.

It lets you defer updating a part of the UI.

Small 🧵 During the initial render, the returned deferred value will be the same as the value you provided.

During updates, React will first attempt a re-render with the old value (so it will return the old value), and then try another re-render in background with the new value.
Mar 19, 2023 7 tweets 2 min read
ChatGPT will get you nowhere and you will also embarrass yourself.

Yes, it's a hook. Now let's talk a little bit about why ChatGPT is total bullshit (ATM) and I won't be giving up on Google.

I'll talk in the context of web development and the knowledge around that area.

🧵👇 Image What's the main problem with ChatGPT?

The fact that you're left with it on your own.

👇