<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pavlo Buidenkov</title>
    <description>The latest articles on DEV Community by Pavlo Buidenkov (@pavlobu).</description>
    <link>https://dev.to/pavlobu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F570482%2F69fda4e9-3815-41b2-b88c-0ad47031c150.jpeg</url>
      <title>DEV Community: Pavlo Buidenkov</title>
      <link>https://dev.to/pavlobu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pavlobu"/>
    <language>en</language>
    <item>
      <title>Zustand - better redux-devtools middleware</title>
      <dc:creator>Pavlo Buidenkov</dc:creator>
      <pubDate>Wed, 16 Nov 2022 23:11:32 +0000</pubDate>
      <link>https://dev.to/pavlobu/zustand-better-redux-devtools-middleware-498g</link>
      <guid>https://dev.to/pavlobu/zustand-better-redux-devtools-middleware-498g</guid>
      <description>&lt;p&gt;👋 Hi all,&lt;/p&gt;

&lt;p&gt;Today I wanted to share with you a small improvement that I've made for &lt;a href="https://github.com/pmndrs/zustand" rel="noopener noreferrer"&gt;Zustand&lt;/a&gt; for local react state management.&lt;/p&gt;

&lt;h1&gt;
  
  
  Warning
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: the feature described in this post is already included in &lt;code&gt;zustand&lt;/code&gt; version &lt;code&gt;v4.2.0&lt;/code&gt;. So go ahead and update your zustand version to use this feature. You can still read this post for fun.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Zustand is a great tool, and it has a built in redux devtools integration.&lt;br&gt;
We all know that it can be used like this:&lt;br&gt;
&lt;code&gt;import { devtools } from 'zustand/middleware'&lt;/code&gt;&lt;br&gt;
It already has great features built in out of the box, but lacks some functionality that you may be used to find in redux devtools.&lt;/p&gt;
&lt;h2&gt;
  
  
  Current zustand devtools middleware problem
&lt;/h2&gt;

&lt;p&gt;Zustand is meant to be used to create as many stores as you want with &lt;code&gt;create&lt;/code&gt;.&lt;br&gt;
In current implementation in order to use a rewind feature of redux devtools extension, you will need to select in a dropdown different stores in which you can do time traveling. So switching back and forth for each store in redux devtools is not really convenient and you would want to have a time travel in one tab for all stores. Besides, redux-toolkit has this feature built in out of the box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iyjzt4mqwfuicjqbwre.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3iyjzt4mqwfuicjqbwre.gif" alt="Demo with a current problem of zustand devtools middleware" width="800" height="400"&gt;&lt;/a&gt;&lt;em&gt;Demo with a current problem of zustand devtools middleware&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Solution
&lt;/h2&gt;

&lt;p&gt;In order to use one redux devtools extension connection for all your zustand stores you can use this package &lt;code&gt;@pavlobu/zustand&lt;/code&gt; instead of &lt;code&gt;zustand&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm i @pavlobu/zustand
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;NOTE: this package can be used temporarily. Zustand developers may include &lt;code&gt;@pavlobu/zustand&lt;/code&gt; devtools middleware feature in future with a PR that I’ve opened.. I will update this post in case it will be merged.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@pavlobu/zustand&lt;/code&gt; has the same interface for zustand devtools middleware.&lt;br&gt;
Just use&lt;br&gt;
&lt;code&gt;import { devtools } from '@pavlobu/zustand/middleware'&lt;/code&gt;&lt;br&gt;
or&lt;br&gt;
&lt;code&gt;import { devOnlyDevtools } from '@pavlobu/zustand/middleware'&lt;/code&gt;&lt;br&gt;
&lt;code&gt;devOnlyDevtools&lt;/code&gt; can be used if you need redux devtools only for development builds. &lt;a href="https://github.com/pavlobu/zustand/tree/%40pavlobu-zustand-devtools-middleware/examples/dev-env-devtools-many-stores#note-on-devonlydevtools-usage" rel="noopener noreferrer"&gt;More details&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://github.com/pavlobu/zustand/tree/%40pavlobu-zustand-devtools-middleware/examples/dev-env-devtools-many-stores" rel="noopener noreferrer"&gt;Refer to this demo project on how to use &lt;code&gt;@pavlobu/zustand&lt;/code&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F162k7welxcoym0c42h8q.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F162k7welxcoym0c42h8q.gif" alt="Image description" width="800" height="400"&gt;&lt;/a&gt;&lt;em&gt;Demo of a solution. One redux devtools extension connection can be used for all zustand stores&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That's it, hope you've enjoyed this tiny little improvement on an awesome zustand devtools middleware.&lt;br&gt;
Stay tuned, because who knows, maybe his feature will be approved by zustand developers and will be included in the next release :)&lt;/p&gt;

&lt;p&gt;Have a nice day! 👋&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>Deskreen Introduction: Turn Any Device With Browser Into a Secondary Screen</title>
      <dc:creator>Pavlo Buidenkov</dc:creator>
      <pubDate>Sat, 30 Jan 2021 19:33:45 +0000</pubDate>
      <link>https://dev.to/pavlobu/deskreen-introduction-turn-any-device-with-browser-into-a-secondary-screen-4658</link>
      <guid>https://dev.to/pavlobu/deskreen-introduction-turn-any-device-with-browser-into-a-secondary-screen-4658</guid>
      <description>&lt;p&gt;Meet Deskreen - an open source app that turns any device with a web browser into a secondary screen for your computer. Built with web technologies and ElectronJS so it is cross-platform. It supports Windows, MacOS and Linux.&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://deskreen.com"&gt;https://deskreen.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Why I made Deskreen?&lt;br&gt;
It all started with me wanting to use my iPad as a secondary screen for my Macbook. But I found that it is already outdated to use 'Sidecar' - a MacOS built in feature for that purpose. I tried upgrading both of them, but it didn't help. The only option left was to buy a new iPad and even new Macbook, which I did not want to do. I also have a Windows PC and sometimes I need to use my iPad as second screen for it as well.&lt;/p&gt;

&lt;p&gt;I tried to look for FREE solutions on internet, but I could not find anything that would fit my expectations. Besides, all methods using free software for screen sharing I found, were different for Windows, Mac and Linux. I got very confused about it. Then I got an idea of creating Deskreen.&lt;/p&gt;

&lt;p&gt;I decided to make it free and open-source to help people to solve this problem. Deskreen works the same for Windows, MacOS and Linux.&lt;/p&gt;

&lt;p&gt;Github repo: &lt;a href="https://github.com/pavlobu/deskreen"&gt;https://github.com/pavlobu/deskreen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you like it!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>linux</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
