<?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: Klaudia Jaszczak</title>
    <description>The latest articles on DEV Community by Klaudia Jaszczak (@claudiakwj).</description>
    <link>https://dev.to/claudiakwj</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%2F816195%2Fd852ab7d-204f-45db-bfea-698a1f924c5b.jpg</url>
      <title>DEV Community: Klaudia Jaszczak</title>
      <link>https://dev.to/claudiakwj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/claudiakwj"/>
    <language>en</language>
    <item>
      <title>My new AI app: childbook.ai - create a personalized children's book</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Mon, 26 Dec 2022 20:39:39 +0000</pubDate>
      <link>https://dev.to/claudiakwj/my-new-ai-app-childbookai-create-a-personalized-childrens-book-13b9</link>
      <guid>https://dev.to/claudiakwj/my-new-ai-app-childbookai-create-a-personalized-childrens-book-13b9</guid>
      <description>&lt;p&gt;Hi! 😄&lt;br&gt;
Recently, together with Wojciech Jaszczak we took part in the AssemblyAI hackathon, which involved creating an AI-powered app in two days. 🚀 Although we didn't manage to win but we believed our initial MVP was good enough to take it a bit further.😊&lt;/p&gt;

&lt;p&gt;Today I present you &lt;a href="http://childbook.ai" rel="noopener noreferrer"&gt;http://childbook.ai&lt;/a&gt; ✨ - A generative AI children's book creator. You can describe your characters and give a title and however long/detailed description you want, the gpt-3 will generate a children's story from it, dall-e will generate images. Images are postprocessed with stable-diffusion custom model (for stylisation) and that's the final result. 📖 &lt;/p&gt;

&lt;p&gt;Example of generated books:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.childbook.ai/book/clbxjxxjp0000mq08xtavb4b9" rel="noopener noreferrer"&gt;https://www.childbook.ai/book/clbxjxxjp0000mq08xtavb4b9&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.childbook.ai/book/clbxlm24t0000jj08b3vcvfjh" rel="noopener noreferrer"&gt;https://www.childbook.ai/book/clbxlm24t0000jj08b3vcvfjh&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.childbook.ai/book/clbxkxkkb000blf08kmzvcysp" rel="noopener noreferrer"&gt;https://www.childbook.ai/book/clbxkxkkb000blf08kmzvcysp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&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%2Fqww1f7t3ms3eto61g3px.jpg" 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%2Fqww1f7t3ms3eto61g3px.jpg" alt="astronaut the first page" width="423" height="720"&gt;&lt;/a&gt;&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%2Fc3fphg8lbg1ynwpkkiuo.jpg" 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%2Fc3fphg8lbg1ynwpkkiuo.jpg" alt="book about an little astronaut" width="800" height="706"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch the video on how to easily and quickly create a personalized book:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=QXuzWrOhBPk&amp;amp;t=1s" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=QXuzWrOhBPk&amp;amp;t=1s&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inspiration&lt;/strong&gt;&lt;br&gt;
Our inspiration for creating children's books is the imagination and creativity of children. The best authors of children's books are children themselves, who are able to come up with incredible stories and visions. Books are incredibly important for a child's development, helping to develop imagination and creativity and teaching reading and proper pronunciation. We are proud to create personalized children's books that will be a wonderful adventure for them and help them in their development. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does&lt;/strong&gt;&lt;br&gt;
With our app and the use of artificial intelligence, you can create your own personalized children's book. This book is personalized in terms of content, characters, and illustrations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Unique &lt;br&gt;
Stories we create are unique and we make sure that they are different from the rest. The stories we create are never copied from anywhere. What we show is one of a kind.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Personalized &lt;br&gt;
They are not just stories but they are the stories that you want to hear. The characters are the ones that you want to see. And adventures they have are the onse you want to experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Illustrated &lt;br&gt;
Stories we create are illustrated. The characters and the adventures are illustrated. We make sure that the stories are not just words but that they are also visually appealing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Accessible &lt;br&gt;
The created stories and illustrations are accessible. We added a feature of text to speech so that the stories can be listened to as well. With a voice over, the stories are more fun.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fbd1vulgux98acv6zkh83.jpg" 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%2Fbd1vulgux98acv6zkh83.jpg" alt="example of book" width="800" height="720"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How we built it&lt;/strong&gt;&lt;br&gt;
We created the web application with Next.js, tRPC, prisma, postgreSQL, redis, tailwind. The AI part is handled by OpenAI API (GPT3, DALL-E) and stable diffusion.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges we ran into&lt;/strong&gt;&lt;br&gt;
The biggest challenge is to achieve consistent, similar style illustrations where the characters are repeatable. And also depicting in the illustration exactly what the text contains is one of the harder tasks. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Accomplishments that we're proud of&lt;/strong&gt;&lt;br&gt;
We are proud that we were able to create a product in two days that can make many children happy. They will be able to create a book with their own adventures or with stories they have invented themselves, with the help of their parents. Additionally, we created the option to listen to the book and descriptions of the illustrations to make the book accessible to blind people. It is a wonderful initiative. 😊&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we learned&lt;/strong&gt;&lt;br&gt;
We have learned that artificial intelligence is very important and offers many possibilities. Thanks to it, we can create increasingly advanced programs that will help us in our daily lives. Artificial intelligence will be used in many fields such as education, medicine, transportation, and services. With the help of AI, we will be able to solve increasingly complex problems and better understand the world. We are constantly developing our technologies to make the best use of the potential of artificial intelligence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's next for Children's Book illustrator&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;improve the consistency of the illustrations and characters,&lt;/li&gt;
&lt;li&gt;add different lectors (e.g. characters from fairy tales) that read a book, so that children can choose who will read the book to them,&lt;/li&gt;
&lt;li&gt;create a slideshow video for each generated book,&lt;/li&gt;
&lt;li&gt;add the feature of sharing the generated book on social media&lt;/li&gt;
&lt;/ul&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%2Fes2hptorr7qd99rq4l4p.jpg" 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%2Fes2hptorr7qd99rq4l4p.jpg" alt="example of book2" width="800" height="716"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The payment model&lt;/strong&gt;&lt;br&gt;
For now, the payment model is pay what you want. The first book  is for free. So feel free 😊 to test it out.🦾 &lt;/p&gt;

&lt;p&gt;Hopefully, you will like it. Feel free to comment any feedback will be appreciated 😊&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.childbook.ai" rel="noopener noreferrer"&gt;www.childbook.ai&lt;/a&gt; ❤️&lt;/p&gt;

</description>
      <category>bitcoin</category>
      <category>cryptocurrency</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Responsive Web Design</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Wed, 06 Apr 2022 17:02:57 +0000</pubDate>
      <link>https://dev.to/claudiakwj/responsive-web-design-432k</link>
      <guid>https://dev.to/claudiakwj/responsive-web-design-432k</guid>
      <description>&lt;p&gt;&lt;strong&gt;RWD - Responsive Web Design&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As a Front-End developer, I want to create websites that look good on all devices (mobile, tablets, large screens...). Some components will be universal for all devices. However, some of them require improvements so that the end-user is equally satisfied with the website on all their devices.&lt;/p&gt;

&lt;p&gt;There are two approaches to creating responsive websites (good and ... not-good). 😄&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first approach is &lt;strong&gt;desktop-first&lt;/strong&gt; the "not-good" one. By writing "not-good", I mean not recommended. But why❔ &lt;br&gt;
In this approach, we build a website starting with large screens and then add code to handle increasingly smaller resolutions.&lt;br&gt;
When building websites for the desktop, we have more possibilities. We create websites full of content with beautiful animations, enriched with additional functionalities using modern technologies.  Then we want to translate it all 1: 1 into smaller devices and then it turns out that it cannot be scaled this way. In such a case, the functionalities have to be cut down to the basic ones or we need to start looking for alternative solutions only to use them on the mobile version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The second, "good" approach is &lt;strong&gt;mobile-first&lt;/strong&gt;. This is the recommended approach for creating an RWD page. In this case, we first create a website for mobile devices and then move on to higher resolutions.&lt;br&gt;
Starting with creating a mobile website taking into account the available technologies, functionalities, and website readability for smaller resolutions - we do not have to give up anything in the next stages. Moving on - when adjusting the website for higher resolutions, all that remains is to expand the design. We can add something, thus making the website look or work even better. Thanks to this approach, we can be sure that the end-user using the mobile website will be as satisfied as the one using the website on the computer. 😊&lt;br&gt;
But to not make it sound too good to be true, it is worth adding a disadvantage of this approach. I believe it is more difficult to start creating the pages for mobile devices first and after that expand the website with additional functionalities. It is always easier to cut something off and give up something, but is it better? Probably not. 😏&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I also post a short video of how I created a responsive website for the client.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---6POnOLp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ny6tpono7naug02mif06.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---6POnOLp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ny6tpono7naug02mif06.gif" alt="RWD example" width="880" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rwd</category>
      <category>mobilefirst</category>
      <category>design</category>
      <category>programming</category>
    </item>
    <item>
      <title>Add loading of components definitions inside Strapi plugin - pull request</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Mon, 28 Mar 2022 17:33:45 +0000</pubDate>
      <link>https://dev.to/claudiakwj/add-loading-of-components-definitions-inside-strapi-plugin-pull-request-1i2o</link>
      <guid>https://dev.to/claudiakwj/add-loading-of-components-definitions-inside-strapi-plugin-pull-request-1i2o</guid>
      <description>&lt;p&gt;Hi 👋,&lt;br&gt;
for people interested in creating their own plugins for &lt;a class="mentioned-user" href="https://dev.to/strapijs"&gt;@strapijs&lt;/a&gt;  - I created the Pull Request on GitHub. 🎇&lt;br&gt;
The PR is about allowing plugin creator to declare his own custom content type components inside plugin. This will open new doors for plugin creators. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In short:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;What does it do?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
I have added loading of components definitions from Strapi plugins. It allows loading components from &lt;code&gt;plugin/server/components&lt;/code&gt; folder.&lt;br&gt;
It allows components to be overwritten by local components, when editing in content-type manager.&lt;br&gt;
It will prefix components categories defined inside the plugin with either plugin name or componentsPrefix (if defined in plugin package.json).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;How to test it?&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
I have modified the examples/getstarted to make use of the components defined in plugin as well as added a content-type that makes full use of newly defined components.&lt;/p&gt;

&lt;p&gt;I and &lt;a class="mentioned-user" href="https://dev.to/jaszczw"&gt;@jaszczw&lt;/a&gt; will be actively supporting the PR. 🤞&lt;br&gt;
We need the PR merged to complete one of our projects. 💡&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Find out more here:&lt;/strong&gt; &lt;a href="https://github.com/strapi/strapi/pull/12965"&gt;https://github.com/strapi/strapi/pull/12965&lt;/a&gt;&lt;/p&gt;

</description>
      <category>strapi</category>
      <category>pullrequest</category>
      <category>opensource</category>
      <category>plugin</category>
    </item>
    <item>
      <title>React Hook: useEffect simplified flow</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Wed, 16 Mar 2022 16:47:07 +0000</pubDate>
      <link>https://dev.to/claudiakwj/react-hook-useeffect-simplified-flow-1j63</link>
      <guid>https://dev.to/claudiakwj/react-hook-useeffect-simplified-flow-1j63</guid>
      <description>&lt;p&gt;For people who like diagrams😊- I have prepared my own diagram showing useEffect flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fz09lyqv6pv7hm3y1ghz3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fz09lyqv6pv7hm3y1ghz3.png" alt="diagram useEffect flow"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>hooks</category>
      <category>useeffect</category>
      <category>diagram</category>
    </item>
    <item>
      <title>Step by step: React Timer Component Using Hooks</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Wed, 16 Mar 2022 14:12:03 +0000</pubDate>
      <link>https://dev.to/claudiakwj/step-by-step-react-timer-component-using-hooks-43je</link>
      <guid>https://dev.to/claudiakwj/step-by-step-react-timer-component-using-hooks-43je</guid>
      <description>&lt;p&gt;&lt;strong&gt;Today I would like to show you my example of creating a timer.&lt;/strong&gt;⏱️&lt;/p&gt;

&lt;p&gt;This is what the component looks like (in storybook) :&lt;br&gt;
&lt;a href="https://media.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%2Fco0xedgjuzbuarg5fgxx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fco0xedgjuzbuarg5fgxx.gif" alt="storybook example Timer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Programming language:&lt;/strong&gt; JavaScript / TypeScript&lt;br&gt;
&lt;strong&gt;Library:&lt;/strong&gt; React&lt;br&gt;
&lt;strong&gt;Usage:&lt;/strong&gt; timer as a functional component using react-hooks,&lt;br&gt;
&lt;strong&gt;Expectations:&lt;/strong&gt; displays the elapsed time while taking the quiz and displays the total time in the last step that is the result of the quiz&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F4sourfz5yzcchvq36tgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F4sourfz5yzcchvq36tgb.png" alt="Timer Component"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I create an arrow function called Timer and pass 3 arguments to it: &lt;code&gt;isActive&lt;/code&gt;, &lt;code&gt;seconds&lt;/code&gt;, &lt;code&gt;setSeconds&lt;/code&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;isActive&lt;/code&gt; is a boolean variable that provides information as to whether the Timer is on (if &lt;code&gt;isActive&lt;/code&gt; is true, the clock is running)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;seconds&lt;/code&gt; is a variable of the type &lt;code&gt;number&lt;/code&gt; that represents the value of the clock counter. The value that initializes this variable is 0 because this timer will begin counting from 0&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;setSeconds&lt;/code&gt; is a function that modifies state which is contained in another component, it expects that passed function to behave like the function returned by hook &lt;code&gt;useState&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The body of the Timer function contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;useEffect in which: 

&lt;ul&gt;
&lt;li&gt;if &lt;code&gt;isActive&lt;/code&gt; is true, i.e. the clock is on, the JavaScript function &lt;code&gt;setInterval&lt;/code&gt; will run, which increases the variable seconds by one every 1000 milliseconds - that is every 1 second&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;setSeconds(prevSeconds =&amp;gt; prevSeconds + 1)&lt;/code&gt; means that the previous value is increased by one (0 + 1 = 1, 1 + 1 = 2, 2 + 1 = 3, 3 +1 = 4 ... etc)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;I'll pause here to explain why we're using the useEffect Hook.&lt;br&gt;
When looking for information about &lt;code&gt;useEffect&lt;/code&gt;, you can often encounter the following content: "The Effect Hook lets you perform side effects in function components.". Personally, that doesn't tell me much. So I will share how I understand it. &lt;/p&gt;

&lt;p&gt;Hook &lt;code&gt;useEffect&lt;/code&gt; is like a combination of &lt;code&gt;componentDidMount&lt;/code&gt;, &lt;code&gt;componentDidUpdate&lt;/code&gt;, and &lt;code&gt;componentWillUnmount&lt;/code&gt;. It is related to the component lifecycle because it starts only when the component is mounted and exits when the component has been unmounted on the page. &lt;/p&gt;

&lt;p&gt;In addition, we use &lt;code&gt;useEffect&lt;/code&gt; for components whose functionality does not depend on the direct user interaction of the interface. Our sample clock will update itself while active with the passage of time, it does not depend on the interaction of the user using the website, it is not possible to click on it and change it.&lt;/p&gt;

&lt;p&gt;Another feature of using &lt;code&gt;useEffect&lt;/code&gt; is that in addition to starting a timer, it will also handle a timer clean up, which should always happen before the component is unmounted. &lt;/p&gt;

&lt;p&gt;The operation of &lt;code&gt;useEffect&lt;/code&gt; and its updating can be made dependent on some other data using the dependency table. In this case, in the dependency array, I have put: &lt;code&gt;isActive&lt;/code&gt; and &lt;code&gt;setSeconds&lt;/code&gt;. The dependency on &lt;code&gt;isActive&lt;/code&gt; is that when &lt;code&gt;isActive&lt;/code&gt; changes to false, the clock should stop counting. The change will run again &lt;code&gt;useEffect&lt;/code&gt; which on the second execution will start with the &lt;code&gt;clearInterval&lt;/code&gt; cleaning function, then in the function body the &lt;code&gt;if(isActive)&lt;/code&gt; condition will be checked again and the function will exit. &lt;/p&gt;

&lt;p&gt;The second dependency &lt;code&gt;setSeconds&lt;/code&gt; is making sure, that &lt;code&gt;useEffect&lt;/code&gt; will always use the current version of this function.&lt;/p&gt;

&lt;p&gt;For people who like diagrams😊- I have prepared my own diagram showing useEffect flow: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Ft6t9l4n87qztpx65bdve.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Ft6t9l4n87qztpx65bdve.png" alt="diagram useEffectflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Finally, Timer returns the Typography component (from the MUI library), which displays the elapsed time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I display the elapsed time in hh:mm:ss format and use the &lt;code&gt;formatSeconds&lt;/code&gt; function to get seconds into that format.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F3nhzyte248wyy9nspo3h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F3nhzyte248wyy9nspo3h.png" alt="function formatSeconds"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, you can display a working Timer wherever you want on the page💁 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fnvoon2st62uvi2eg5m7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnvoon2st62uvi2eg5m7i.png" alt="all code"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Year after I left my job to become software developer</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Tue, 08 Mar 2022 16:15:11 +0000</pubDate>
      <link>https://dev.to/claudiakwj/year-after-i-left-my-job-to-become-software-developer-391d</link>
      <guid>https://dev.to/claudiakwj/year-after-i-left-my-job-to-become-software-developer-391d</guid>
      <description>&lt;p&gt;On International Women's Day, I would like to share with you what positive changes I have made in my life in the last year. 😊&lt;/p&gt;

&lt;p&gt;Back in 2020, I was working as a financial controller. Some of my responsibilities were creating many financial reports, conducting optimization meetings, and implementing KPIs. While creating yet another similar report, I was constantly thinking about automating my work.🤖 The words "optimization" and "automation" were constantly on my mind. I wanted to improve and speed up everything. So I went to VBA training in Excel to be able to do some things faster and more automated way. &lt;/p&gt;

&lt;p&gt;And then I started to think about programming more and more. I found it extremely interesting and magical. Probably for many beginners - programming is magic. I am writing something line by line and suddenly... WOW so much has happened! 🔥😎 When you can see the results of your work, it gives a lot of satisfaction.&lt;/p&gt;

&lt;p&gt;A great inspiration for me is my wonderful husband who is an experienced programmer. Seeing my enthusiasm for the field of programming, he offered to teach me JavaScript. And that's how I started learning. Soon after I left my job and entered this beautiful and magical world of software development. 🪄&lt;/p&gt;

&lt;p&gt;I am very satisfied with this decision for many reasons.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First of all, I am fulfilling myself. Programming is a very developing activity. It requires concentration, logical thinking, and constant training, which translates into maintaining a good condition of the brain. &lt;/li&gt;
&lt;li&gt;Programming gives a lot of satisfaction - when the code works, of course, and teaches a great deal of patience - when the code does not work. 😄&lt;/li&gt;
&lt;li&gt;Thanks to working as a software developer, I can also work remotely, from anywhere in the world. During last year, I saw many beautiful places that I had only heard about before. 💚 When I want to visit my family, I don't have to take a break. I can take my laptop and work from my family home, spending the afternoons with my loved ones. This freedom of life and development stimulates creativity and gives me a lot of joy personally. &lt;/li&gt;
&lt;li&gt;Moreover, I believe programming is the future. Thanks to programming, we can change the world for the better. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would still call myself a novice programmer, but today on International Women's Day I wish myself that in the future I will create beautiful things with code. 💚 🍀&lt;/p&gt;

&lt;p&gt;I am also very curious about your stories (not only of women)? What professions did you give up to change your life? And are you satisfied with these changes? 😊&lt;/p&gt;

&lt;p&gt;And finally, all the best, my dear women, fulfill yourselves and do not be afraid of changes, because only changes can improve something in our lives! Kisses!💋&lt;/p&gt;

</description>
      <category>programming</category>
      <category>career</category>
      <category>motivation</category>
      <category>wecoded</category>
    </item>
    <item>
      <title>How to open react-select menu on click of a button?</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Wed, 02 Mar 2022 13:46:55 +0000</pubDate>
      <link>https://dev.to/claudiakwj/how-to-open-react-select-menu-on-click-of-a-button-2h85</link>
      <guid>https://dev.to/claudiakwj/how-to-open-react-select-menu-on-click-of-a-button-2h85</guid>
      <description>&lt;p&gt;My answer to the question "How to open react-select menu on click of a button?" on stackoverflow:&lt;br&gt;
&lt;a href="https://stackoverflow.com/questions/60257724/how-to-open-react-select-menu-pragmatically" rel="noopener noreferrer"&gt;https://stackoverflow.com/questions/60257724/how-to-open-react-select-menu-pragmatically&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can try and use storing a ref to the component, calling a &lt;code&gt;.focus()&lt;/code&gt; on it. And pass to the React Select prop &lt;code&gt;openMenuOnFocus&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Short essence: &lt;br&gt;
&lt;a href="https://media.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%2F7kv4l8l09q7psqrurshw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F7kv4l8l09q7psqrurshw.png" alt="short essence"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sample on codesandbox: &lt;a href="https://codesandbox.io/s/react-select-hooks-forked-qol5m" rel="noopener noreferrer"&gt;https://codesandbox.io/s/react-select-hooks-forked-qol5m&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fbuflex4yi72njj161zfq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fbuflex4yi72njj161zfq.png" alt="example"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stackoverflow</category>
      <category>react</category>
      <category>frontend</category>
      <category>casestudy</category>
    </item>
    <item>
      <title>Giving power back to the Client!</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Mon, 28 Feb 2022 08:39:54 +0000</pubDate>
      <link>https://dev.to/claudiakwj/giving-power-back-to-the-client-2g2k</link>
      <guid>https://dev.to/claudiakwj/giving-power-back-to-the-client-2g2k</guid>
      <description>&lt;p&gt;While working on web application (especially those whose content is dynamic), we will often want to add or change some content on the website, so in our best interest is to ensure that those changes would not mean any additional developer work. To achieve that, we can use CMS system, my favorite one so far is Strapi CMS.&lt;/p&gt;

&lt;p&gt;The client usually does not want to be dependent on a software developer. He would like to independently control the content of his application, for example in a blog, add new posts, change pictures, etc. In turn, the developer does not want to correct typos in the client's text or change the picture on the post again.&lt;/p&gt;

&lt;p&gt;By determining together with the client, the developer or client can define all the fields in the strapi that are needed by the client to manage the content. For example, when building a post section - they can define fields: title, description, picture /video, etc. after which content of those fields can be fully managed by client.&lt;/p&gt;

&lt;p&gt;Independence will bring benefits to each of the parties (developer and client) and this is how it should work.&lt;/p&gt;

&lt;p&gt;Below short video of strapi CMS, where the client manages the content himself and the view how it is then displayed on the website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tI17PsXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ua51lyldotd22zgchv7.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tI17PsXD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ua51lyldotd22zgchv7.gif" alt="strapi example" width="880" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>strapi</category>
      <category>cms</category>
      <category>react</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Mature optimization is not that evil</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Fri, 25 Feb 2022 19:47:30 +0000</pubDate>
      <link>https://dev.to/claudiakwj/mature-optimization-is-not-that-evil-14lg</link>
      <guid>https://dev.to/claudiakwj/mature-optimization-is-not-that-evil-14lg</guid>
      <description>&lt;p&gt;You probably know saying "Premature optimization is the root of all evil", but is all optimization premature and evil?&lt;br&gt;
Sometimes 1% differences can have a significant impact.&lt;br&gt;
In a world where everybody is using their phone for browsing the internet, small optimizations can mean additional minutes of browsing time on a single charge.&lt;/p&gt;

&lt;p&gt;Today I wanted to write about a little feature in React that will help you on your journey of 1% improvements.&lt;br&gt;
&lt;code&gt;useMemo()&lt;/code&gt; is a hook that returns the memoized value. We can use this hook when we want to avoid calculations every time we render the component. The first argument of the &lt;code&gt;useMemo()&lt;/code&gt; hook is a function we create, and the second is an array of dependencies. By passing a function to &lt;code&gt;useMemo()&lt;/code&gt; hook, it will be called in the first render, and the stored value will be returned on each subsequent re-render, so you can avoid additional calculations each time the component is rendered. However, if one of the values passed in the array of dependencies changes, the function will be called again to obtain and store the new value. &lt;/p&gt;

&lt;p&gt;It's important to first write code that works and then add performance optimization to it using &lt;code&gt;useMemo()&lt;/code&gt;. Properly used &lt;code&gt;useMemo()&lt;/code&gt; does not change anything in the behavior of the application, it only affects performance.&lt;/p&gt;

&lt;p&gt;The examples of &lt;code&gt;useMemo()&lt;/code&gt; based on a counter are everywhere, so I'm adding my simple example below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6RrRmvVM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0674gqksmwl0z6dtbqey.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6RrRmvVM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0674gqksmwl0z6dtbqey.png" alt="useMemo() simple example" width="880" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm creating a quiz in which content will be defined by the user, the quiz will have multiple stages/steps. Depending on the stages of the quiz, as well as the selected language, I want to display a different label on the button. For example, when displaying questions, the footer with "prev" / "next" buttons will be displayed, but when it is the last question, instead of "next" I will display "submit" on the button, etc. &lt;/p&gt;

&lt;p&gt;This way the label won't be recalculated until we move to another 'stage' of the quiz. Otherwise, a re-render is not needed. It may be a small change, but it things like that add up.&lt;/p&gt;

&lt;p&gt;I think it's always a good idea to review your code and consider if there's any room for improvement.&lt;/p&gt;

</description>
      <category>react</category>
      <category>hooks</category>
      <category>beginners</category>
      <category>optimization</category>
    </item>
    <item>
      <title>Benefits of using Strapi with Typescript + Storybook tandem</title>
      <dc:creator>Klaudia Jaszczak</dc:creator>
      <pubDate>Wed, 16 Feb 2022 14:31:08 +0000</pubDate>
      <link>https://dev.to/claudiakwj/benefits-of-using-strapi-with-typescript-storybook-tandem-ccm</link>
      <guid>https://dev.to/claudiakwj/benefits-of-using-strapi-with-typescript-storybook-tandem-ccm</guid>
      <description>&lt;p&gt;We are working on react components integrated with strapi and  storybook. Both for me - a novice programmer and for Wojtek - a programmer with many years of experience and extensive knowledge, it brings many benefits.&lt;/p&gt;

&lt;p&gt;Starting with strapi, we can determine the content type, decide what fields our components will need, e.g. whether a given component will contain a title, description, photo and whether, for example, it must meet a condition to be displayed. In strapi, we can manage the content that we want to include in a given component. We can also easily change it - so that a non-programmer can edit the content.&lt;/p&gt;

&lt;p&gt;All data that we input into strapi can be obtained using GraphQL API or REST API. On top of that with the help of a graphql-codegen tool we can make the graphql response typed in typescript.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fxc28o4zznkqf0wae1n5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fxc28o4zznkqf0wae1n5p.png" alt="GraphQL query and response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typescript shows us what data and in what form component expects to receive. Typescript is also responsible for maintaining contract between strapi responses and components props.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fksf95xj9rwxdsqu6xdjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fksf95xj9rwxdsqu6xdjg.png" alt="Typed strapi response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By passing these props to the components, we can display them by creating a story in the storybook. The storybook shows what a given component will look like and allows you to create different variants of component. We can create stories for different themes, multiple language versions and for example show negative scenarios, for when user forgot to input some data or we have had an backend issue, showcasing display of appropriate error message and gracefully handling those scenarios as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fpnanofpikx7z87uo7xxt.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fpnanofpikx7z87uo7xxt.gif" alt="Storybook example"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This combination of strapi + sb + ts allows a front end developer to work without being strictly dependent on the backend. As long as the initial contract is maintained. But also using Strapi by itself which provides most of the CRUD operations out of the box, limits the amount of custom backend code that needs to be written significantly, which in turn speeds up the development process and amount of bugs that can be introduced.&lt;/p&gt;

&lt;p&gt;However, it brings the most benefits for the client, who can :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;manage the content of his application in strapi without the help of a developer&lt;/li&gt;
&lt;li&gt;check how the components will look like, as well as all their variants in the storybook, while the application is still being worked on&lt;/li&gt;
&lt;li&gt;strapi is free and open-source CMS which is constantly being improved and enhanced by the community, making it a choice that in the future may support even more features&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>storybook</category>
      <category>strapi</category>
      <category>typescript</category>
      <category>cms</category>
    </item>
  </channel>
</rss>
