<?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: Matias Arabolaza</title>
    <description>The latest articles on DEV Community by Matias Arabolaza (@matias2205).</description>
    <link>https://dev.to/matias2205</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%2F442268%2F0def3e1a-5e10-4b15-82e3-4e627a0ca9fe.jpg</url>
      <title>DEV Community: Matias Arabolaza</title>
      <link>https://dev.to/matias2205</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/matias2205"/>
    <language>en</language>
    <item>
      <title>Why go Headless?</title>
      <dc:creator>Matias Arabolaza</dc:creator>
      <pubDate>Tue, 09 Mar 2021 13:57:27 +0000</pubDate>
      <link>https://dev.to/matias2205/why-go-headless-i85</link>
      <guid>https://dev.to/matias2205/why-go-headless-i85</guid>
      <description>&lt;p&gt;We've heard a lot about "Headless" in the last year. Headless CMS,  Headless Commerce… but what are they exactly? Which are the main benefits and drawbacks?&lt;br&gt;
Let's go through all the pros and cons of this amazing architecture that is here to stay. &lt;/p&gt;

&lt;h2&gt;
  
  
  First of all, what’s a Headless CMS/Commerce?
&lt;/h2&gt;

&lt;p&gt;In short, a headless platform is an e-commerce/cms that works without a front-end layer at all. Basically it delivers functionalities in isolation. The front end (or the head in this case), is totally decoupled from the backend.&lt;br&gt;
That way, backend developers can use APIs to deliver things like blog posts, products, cart details, etc, while frontend developers can focus only on how to present that content using whatever framework they like. This seems like a dream! &lt;br&gt;
On the other hand, traditional commerce/cms platforms have both the backend and the frontend tightly tied. This means that they are built with a monolithic architecture. As a consequence of this, we have a frontend that is super coupled with the backend layer.&lt;/p&gt;

&lt;p&gt;Headless architecture works with a RESTful API that has a back-end data model and a cloud-based infrastructure. Since the platform is not coupled with the back-end, ecommerce brands can deliver things like content, products and payment gateways to smartwatches, Alexa Skills, and everything in between. (A really omnichannel experience)&lt;/p&gt;

&lt;h2&gt;
  
  
  How headless platforms work
&lt;/h2&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615296715813_headless%2Barchitecture.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615296715813_headless%2Barchitecture.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Headless CMS and commerce work in a very similar way, sending requests between the presentation and application layers using web services or APIs.&lt;br&gt;
For instance, when the user clicks “Add to cart” button, the frontend sends an API call to the backend layer that is in charge of adding that product to our cart and then we get a success or error message so we can notify the user if the product has been added correctly to his cart.&lt;/p&gt;

&lt;p&gt;Ok, now that we know what is a headless CMS/Commerce and we know how they work, let’s check some key benefits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Focus on business
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1614978334514_pexels-fauxels-3183197.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1614978334514_pexels-fauxels-3183197.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back when the only option was the traditional CMS/Commerce platforms people had to spend a lot of time setting up the platform, installing it, taking care of a server, and ensuring other critical aspects such as security.&lt;br&gt;
Headless platforms allow you to focus on the business, to build real solutions for your customers and deliver high value features to the end user. All of this because you don’t have to spend time and money in all the chores mentioned above.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agility and shorter time to market
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615213164217_pexels-lukas-590022.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615213164217_pexels-lukas-590022.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Nowadays, with digital transformation impacting all industries, agility is a real necessity and not just an advantage.&lt;br&gt;
Businesses need to be able to launch new products, ideas, and initiatives faster than ever before. Say goodbye to those super long projects that may take one or two years to hit the market.&lt;br&gt;
With a headless platform you don’t have to wait to have the entire ecosystem finished. You can launch a static website with just a homepage and product page and then add more pages to your site.&lt;br&gt;
In addition to this, having a better separation between the CMS/Ecommerce and your custom code is a real benefit when it comes to deployments, allowing for smooth CI/CD that only deploys your custom code and not the entire platform.&lt;/p&gt;

&lt;h3&gt;
  
  
  Omnichannel experience
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615214843525_omnichannel-customer-experience.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615214843525_omnichannel-customer-experience.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A headless solution will help you ship your content anywhere and everywhere. That means that you, as a brand, can deliver your products on several channels at the same time. You can sell products on a website, mobile, TVs and any device that has a screen and internet connection.&lt;br&gt;
Because we have a totally decoupled solution between backend and frontend, we can have several frontend projects and one backend providing the same information about products, carts, blog posts, etc to all the devices that we want.&lt;br&gt;
Furthermore, you can add new touchpoints easily without building a new backend every time you want to add a new frontend. This opens the door for easier integrations. (We will talk about this later below 👇 )&lt;/p&gt;

&lt;h3&gt;
  
  
  Technology freedom (flexible Frontend development) and innovation
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615234769248_basil-james-iC4BsZQaREg-unsplash.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615234769248_basil-james-iC4BsZQaREg-unsplash.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think this one is one of the most important benefits of a headless solution: Technology freedom. &lt;br&gt;
First of all, you can chose the technology that fits you or your company. You can chose the technology depending on your team. They use React? Vue? Angular? No matter what you chose, you can go ahead with total freedom. Do you want to use a preprocessor like SASS/SCSS? Or why not a super modern framework like Tailwind? Everything is a yes!&lt;br&gt;
Frontend developers can create a user experience from scratch depending on business needs. They don’t need to worry about databases for example, they only need to do is a simple API call. &lt;br&gt;
The only drawback that they have here is there is not presentation layer at all, in comparison with a traditional CMS where you have out of the box pages, like homepage, product page, etc. They have to build everything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Easier integrations
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615235943612_Application-Integration.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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615235943612_Application-Integration.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A headless commerce/CMS solution must have an API which makes our life easier to integrate and communicate with other platforms, such as Payment methods.&lt;br&gt;
What happened when your team wanted to add a new payment method in a traditional platform? It was a nightmare: you either had to go through plugin hell or integrate it yourself.&lt;br&gt;
In a modern solution, integrations by APIs are super easy and straightforward to do. That’s because you have the control and the tool has an API to integrate, with documentation and steps to follow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scaling your application effectively
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615236771295_charles-deluvio-Pu1keJkqeog-unsplash.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615236771295_charles-deluvio-Pu1keJkqeog-unsplash.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since we are in a decoupled architecture, the front-end and back-end teams can work separately and simultaneously. &lt;br&gt;
In a traditional platform they are tightly coupled, so if you want to scale one part of the application you have to scale everything. But in moderns headless solutions, our frontend or backend can be scaled independently. If the marketing team wants to create a promotion or discount for a product, we only need to scale our frontend! We have the control!&lt;/p&gt;

&lt;h2&gt;
  
  
  Some drawbacks
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Time, ongoing costs and responsibility
&lt;/h3&gt;

&lt;p&gt;Like the word says, “Headless” means that we don’t have a presentation layer in the front end at all. &lt;br&gt;
We were talking about this like a big benefit, of course it is. But on the other hand, developers have to build the frontend layer from scratch. Create templates, user interfaces, maintain and support their creations, etc.&lt;br&gt;
In traditional platforms you have the frontend layer working out of the box. &lt;/p&gt;

&lt;h3&gt;
  
  
  Marketing team can be affected
&lt;/h3&gt;

&lt;p&gt;With headless solutions we don’t have a way to create content using WYSIWYG (What you see is what you get) and they can no longer preview the content to see how it looks like on the end user screen. But some moderns solutions are working on a way to preview the content before you publish it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need a headless commerce/CMS?
&lt;/h3&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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615236813793_markus-winkler-wpOa2i3MUrY-unsplash.jpg" 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%2Fpaper-attachments.dropbox.com%2Fs_EDEFFADDB080F62859FE5EADE0E0D0BBFE4F61C28CFA3DB42C7BFEB11600A3CD_1615236813793_markus-winkler-wpOa2i3MUrY-unsplash.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To answer this question I would recommend checking your requirements. &lt;/p&gt;

&lt;p&gt;Some important use cases to have in mind for Headless platforms:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a website with a technology you or your team know&lt;/li&gt;
&lt;li&gt;Use static site generators it’s a possibility because of headless&lt;/li&gt;
&lt;li&gt;You need to go omnichannel. With a headless platform you can provide your content where you need it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In conclusion, Headless platforms (CMS and Commerce) are not a silver bullet. But definitely going headless is the way to go! It provides several benefits and very few drawbacks.&lt;br&gt;
This architecture gives you the ability to distribute your content anywhere and everywhere. &lt;br&gt;
Also the shorter time to market and the freedom to choose any technology that fits better for your business is a key benefit that this solution gives us.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;br&gt;
Follow me on Twitter: &lt;a href="https://twitter.com/matias2205" rel="noopener noreferrer"&gt;https://twitter.com/matias2205&lt;/a&gt;&lt;/p&gt;

</description>
      <category>headless</category>
      <category>commerce</category>
      <category>cms</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Image management made simple with React + Cloudinary</title>
      <dc:creator>Matias Arabolaza</dc:creator>
      <pubDate>Wed, 26 Aug 2020 10:14:37 +0000</pubDate>
      <link>https://dev.to/matias2205/image-management-made-simple-with-react-cloudinary-4i40</link>
      <guid>https://dev.to/matias2205/image-management-made-simple-with-react-cloudinary-4i40</guid>
      <description>&lt;p&gt;Whether in small personal projects or big enterprise ones, image management can get annoyingly complicated. Where to put the files, how to upload them, where are we going to store them, are we going to use a third party service?&lt;/p&gt;

&lt;p&gt;Today I’m going to tell you about a super easy way to upload images to Cloudinary with React (Or you can adapt it to whatever framework/library you’re using)&lt;br&gt;
So, let’s get into it!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Cloudinary?&lt;/strong&gt;&lt;br&gt;
Cloudinary is an end-to-end image and video management solution for websites and mobile apps, covering everything from image and video uploads, storage, manipulations, optimizations, and delivery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ok, a bit more of information?&lt;/strong&gt;&lt;br&gt;
With Cloudinary, you can easily upload images and videos to the cloud and automate smart manipulations without installing any other software. Cloudinary then seamlessly delivers your media through a fast content delivery network (CDN), optimized with the industry’s best practices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does it have a free plan? Can I try it? Can I have a free account for development or small projects?&lt;/strong&gt;&lt;br&gt;
Yes, yes, and yes! Cloudinary offers a full-featured, free plan with a generous usage limit&lt;br&gt;
They give you “credits”. That is equal to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1,000 Transformations OR&lt;/li&gt;
&lt;li&gt;1 GB Storage OR&lt;/li&gt;
&lt;li&gt;1 GB Bandwidth&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That means, at least for dev purposes, A LOT!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Main Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Media upload&lt;/li&gt;
&lt;li&gt;Image and Video transformations&lt;/li&gt;
&lt;li&gt;Optimized and responsive delivery&lt;/li&gt;
&lt;li&gt;Digital Asset Management (DAM)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Setting up our Cloudinary account:
&lt;/h2&gt;

&lt;p&gt;Create an account at &lt;a href="https://cloudinary.com/" rel="noopener noreferrer"&gt;https://cloudinary.com/&lt;/a&gt;&lt;br&gt;
Once you go through the Signup process, you will get on your dashboard.&lt;br&gt;
&lt;em&gt;Important: Remember to activate your account.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Click on the gear icon in the top right of your screen to go to Settings. Then “upload” tab =&amp;gt; Scroll down to the “Upload presets” section and click on “Add upload preset”.&lt;/p&gt;

&lt;p&gt;Here we have two important sections: &lt;strong&gt;Storage and Access&lt;/strong&gt; and &lt;strong&gt;Upload Manipulations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Storage and Access section you have to put an Upload preset name and a folder name for your images (whatever name you prefer) and set the &lt;strong&gt;Signing Mode&lt;/strong&gt; to “Unsigned” (just so you don’t have to go through any  signing process to upload images to your account). You will have something like this:&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AS9zoSxtwr_eqeFQG.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AS9zoSxtwr_eqeFQG.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done that, go to &lt;strong&gt;Upload Manipulations.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click on Edit on Incoming transformation section.&lt;br&gt;
We are going to use two things from here: &lt;strong&gt;Incoming transformation&lt;/strong&gt; and &lt;strong&gt;Eager Transformation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an Incoming Transformation?&lt;/strong&gt;&lt;br&gt;
Any combination of transformation-related parameters for transforming the uploaded media before storing in the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an Eager Transformation?&lt;/strong&gt;&lt;br&gt;
A list of transformations to generate for the uploaded media during the upload process, instead of lazily creating these on-the-fly on access.&lt;/p&gt;

&lt;p&gt;Once you click on the “Edit” button you will get a pop-up with some options:&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AZ9kxVr-dQI-D7Unk.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F0%2AZ9kxVr-dQI-D7Unk.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resize &amp;amp; Crop:&lt;/strong&gt; We can put whatever size we want here and select the mode: scale, crop, fit, fill, etc. I will leave it with Scale, a 250px width and blank height (so it gets adjusted automatically to keep the aspect ratio)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Format &amp;amp; shape:&lt;/strong&gt; Here I’m not going to set anything special, you can play around with these options. I’d prefer not to transform any Corner radius or something like this, because you can do it later without transforming the original one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Look &amp;amp; feel:&lt;/strong&gt; Same as above. You can apply some cool effects like Blur, Grayscale, Colorize, Sepia, etc.&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Ok&lt;/strong&gt; and then go to &lt;strong&gt;Add Eager Transformation.&lt;/strong&gt; Here you will have same options as Incoming transformations. Let’s put some bigger width here like 500px.&lt;/p&gt;

&lt;p&gt;Once you finish, click “ok”. And click “Save” in the right corner above. And that’s it for our account!&lt;/p&gt;
&lt;h2&gt;
  
  
  Time to write some code!
&lt;/h2&gt;

&lt;p&gt;First, let’s create our app&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app react-image-app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then go to that folder with the “cd” command and run “yarn start” or “npm start” (You don’t need to use “npm run start”)&lt;/p&gt;

&lt;p&gt;This will start our development server.&lt;/p&gt;

&lt;p&gt;You can get rid of everything inside App.js and leave it like this:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Then, we can create a new component called UploadImage.js (You can create a component folder inside &lt;strong&gt;src/&lt;/strong&gt; and put it there)&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;What we need to do now is import our new component on our App.js&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;(That’s all for our App.js)&lt;br&gt;
Our app will look like this:&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AjvNu3PwlTlI-r_OT5FoLdw.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AjvNu3PwlTlI-r_OT5FoLdw.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pretty ugly isn’t ?&lt;/p&gt;

&lt;p&gt;We can add some basic styles using styled-components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If you don’t know what Styled Components is:&lt;/strong&gt;&lt;br&gt;
Is a &lt;strong&gt;CSS-in-JS framework.&lt;/strong&gt; It uses tagged template literals in JavaScript and CSS to provide you the ability to write CSS to style react components.&lt;/p&gt;

&lt;p&gt;So, stop your dev server and run: &lt;br&gt;
&lt;code&gt;npm install — save styled-components&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once finished we have to: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import styled-component in our component to use it&lt;/li&gt;
&lt;li&gt;Create two styled elements one is a FormContainer and the another one is a FormElement&lt;/li&gt;
&lt;li&gt;Then use them in the layout&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2An67p_X2W0M7OAjMrkdo6mA.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2An67p_X2W0M7OAjMrkdo6mA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looks somewhat better!&lt;/p&gt;

&lt;p&gt;If you want to know more about Styled Components you can visit the official site, it has a great document section! &lt;a href="https://dev.toStyled%20Components"&gt;https://styled-components.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now let’s keep improving our UploadImage.js component&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add onChange listener to the input file&lt;/li&gt;
&lt;li&gt;Create a new method called handleOnChange uploading the image&lt;/li&gt;
&lt;li&gt;Log upcoming data from Cloudinary&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Let’s check the data coming from Cloudinary!&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2ATyZW-Opl6H4HANimD1JFKQ.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2ATyZW-Opl6H4HANimD1JFKQ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We received a bunch of data here. The important ones for us are:&lt;br&gt;
&lt;strong&gt;secure_url&lt;/strong&gt; for the incoming transformation and &lt;strong&gt;eager&lt;/strong&gt; that can be an array of eager transformations in this case we have only one.&lt;/p&gt;

&lt;p&gt;Now let’s update our component state and the layout to use these images:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Import useState hook from react&lt;/li&gt;
&lt;li&gt;Create uploadedImage and isLoading for the state&lt;/li&gt;
&lt;li&gt;Check if loading, we show a loading message to the user.&lt;/li&gt;
&lt;li&gt;Then once the images are ready we show that to the user.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;It’s working!&lt;/strong&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AwzR6uTSLx_cPrmsgzNCOfg.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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2AwzR6uTSLx_cPrmsgzNCOfg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yay!&lt;/p&gt;

&lt;p&gt;That’s all! Now you have simple image management for your projects, using an amazing tool like Cloudinary. &lt;br&gt;
This is only the basics, Cloudinary has a bunch of cool features there!&lt;/p&gt;

&lt;p&gt;If you want to take a look to the repo, here’s the url: &lt;a href="https://github.com/matias220510/image-upload-cloudinary" rel="noopener noreferrer"&gt;https://github.com/matias220510/image-upload-cloudinary&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if you like my content please follow me on Twitter: &lt;a href="https://twitter.com/matias2205" rel="noopener noreferrer"&gt;Matias Arabolaza&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do you like Nuxt and Cloudinary?&lt;/strong&gt; Well, &lt;strong&gt;Maya Shavin&lt;/strong&gt; wrote an amazing article about Image optimization using her new Cloudinary Nuxt Module. &lt;br&gt;
Don’t wait a minute to check this out: &lt;a href="https://www.mayashavin.com/articles/images-optimized-cloudinary-nuxt" rel="noopener noreferrer"&gt;https://www.mayashavin.com/articles/images-optimized-cloudinary-nuxt&lt;/a&gt;&lt;br&gt;
Twitter: &lt;a href="https://twitter.com/MayaShavin" rel="noopener noreferrer"&gt;Maya Shavin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have any questions, please ask in the comments and share if you like it!&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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2A49y0ugpEhe6lUXGb-MbukA.jpeg" 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%2Fcdn-images-1.medium.com%2Fmax%2F800%2F1%2A49y0ugpEhe6lUXGb-MbukA.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resources:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://cloudinary.com/documentation/javascript_image_and_video_upload" rel="noopener noreferrer"&gt;https://cloudinary.com/documentation/javascript_image_and_video_upload&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>cloudinary</category>
      <category>images</category>
      <category>upload</category>
    </item>
    <item>
      <title>How to be productive working from home</title>
      <dc:creator>Matias Arabolaza</dc:creator>
      <pubDate>Tue, 28 Jul 2020 11:26:31 +0000</pubDate>
      <link>https://dev.to/matias2205/how-to-be-productive-working-from-home-19if</link>
      <guid>https://dev.to/matias2205/how-to-be-productive-working-from-home-19if</guid>
      <description>&lt;p&gt;Work from home is everyone’s dream. The illusion of having entire control of the time, responsibilities, and freedom is something that many want.  But while some people adapt quickly, others struggle and decrease their productivity.&lt;/p&gt;

&lt;p&gt;In my career, I had the experience of working both in office and from home; Something that gave me a very good picture of these two way of working.&lt;/p&gt;

&lt;p&gt;With the current situation of COVID-19, many people and companies were forced to implement WFH (Work from home) practically overnight, without having the necessary infrastructure or the right culture.&lt;/p&gt;

&lt;p&gt;Furthermore, many companies were totally unprepared for this and had to take on this challenge. People in confinement are experiencing moments of uncertainty and fluctuation in mood and emotions, which can directly affect their productivity.&lt;/p&gt;

&lt;p&gt;I want to bring you 10 tips that will help you cope with this stage in an easier way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 — You have to work:&lt;/strong&gt;&lt;br&gt;
Yes, although this sounds too obvious, many people confuse working from home with barely working.&lt;/p&gt;

&lt;p&gt;This has to do with the freedom that this mode offers to us, the idea that no one “sees” us and having our own schedules, working little or nothing, can be tempting. But beware, companies don’t take remote working lightly.&lt;/p&gt;

&lt;p&gt;There is nothing better than mentalizing yourself and starting the day with all the desire, that at the end of the day, working, the mind is busy and the day goes super fast :).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2 — Eat that frog&lt;/strong&gt;&lt;br&gt;
While ago on a trip to NYC, looking for a book that talks about productivity, procrastination and effectiveness, I read “Eat that frog” by Brian Tracy. The book focuses on a saying that says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If the first thing you did would be to eat a live frog first thing in the morning, nothing worse could happen in the rest of the day.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In practical terms, these frogs would be the task we have been delaying for a while.&lt;/p&gt;

&lt;p&gt;Having identified these tasks, we will realize that they are the most impact on our day or our work week.&lt;/p&gt;

&lt;p&gt;Let’s imagine examples: That meeting that is postponed day after day, that task that you don’t want to face because it is scary, that email you have to answer that is impossible, that course that you won’t be encouraged to start, etc.&lt;/p&gt;

&lt;p&gt;It doesn’t necessarily have to be something that takes a lot of hours. Sometimes they can be tasks or things that don’t take soo long, but they’re tasks that have a big positive impact on us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3 —Beware of procrastination&lt;/strong&gt;&lt;br&gt;
Procrastination, the art of delaying things. Procrastinating is leaving things for “later” or “never.” It’s one of the things that point number 2 tells about.&lt;/p&gt;

&lt;p&gt;In the internet there are thousands of articles, hundreds of books and videos that tell us about the subject, since it can be very difficult for many people. And of course, this directly impacts our productivity.&lt;/p&gt;

&lt;p&gt;Is necessary procrastinate? What is what truly makes us dilate the time? I encourage you to read more about procrastination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 — Use techniques to control your times&lt;/strong&gt;&lt;br&gt;
While working in the office as well as at home, reading a little about productivity and how to be effective in both areas, I found some techniques that could help you improve your productivity. Among all the ones I saw, I’ve chosen two of them: Pomodoro and Rest budget.&lt;/p&gt;

&lt;p&gt;“Pomodoro” technique:&lt;br&gt;
Consists of dividing our working time into 30-minute sessions and 5-minute breaks. These sessions are called pomodoros. When the four pomodoros are reached, a 20mins break is made.&lt;/p&gt;

&lt;p&gt;For this, there are desktop applications, mobile apps, and we can even do it manually with a timer.&lt;/p&gt;

&lt;p&gt;“Rest Budget” technique:&lt;br&gt;
The Rest Budget technique consists of having a “time” budget for rest. Unlike the Pomodoro technique, we’re going to be responsible for managing that budget. This technique is much more flexible than the Pomodoro one.&lt;/p&gt;

&lt;p&gt;First thing we need to do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Define the time to work, for example, 8 hours.&lt;/li&gt;
&lt;li&gt;Defining the time to rest from those hours, for example, 1 hour.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every time we take a break, we put a timer, and we reduce that time from our budget.&lt;/p&gt;

&lt;p&gt;This technique has a little more flexibility, since it doesn’t “tie us” to 5 minutes breaks, but is based on what we need at that time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5 — Set your work environment&lt;/strong&gt;&lt;br&gt;
Setting your environment to work will make your day to day easier. Also, it will prime you to start your workday in an environment dedicated exclusively to that. The armchair, is not a good place to work all day, it is, to take a short break or change places from time to time. But having your workplace is going to help you focus and be able to work quiet without distractions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6 — Have a schedule&lt;/strong&gt;&lt;br&gt;
Set up your routine. Having a schedule to respect, is going to be that you have a much more defined structure in your day. Believe me, it’s tempting to get up 5 minutes before working, but it’s not the best way to start the day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7 — Visibility&lt;/strong&gt;&lt;br&gt;
Even if we work standalone, in the case of being freelance, we will always have a team to respond to (our project colleagues, the client, etc.). The best thing we can do is give visibility about what we are doing and how we are moving forward, what is blocking us and what we need from others.&lt;/p&gt;

&lt;p&gt;How do we do this?&lt;/p&gt;

&lt;p&gt;Let the team know you have a break or go for a walk. We’re going to eat. If we have meetings. Today many tools like Outlook, Slack, Skype, let us see the calendar and status of each person. Don’t be afraid to use these features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8 — Breaks&lt;/strong&gt;&lt;br&gt;
An important part of our day are our breaks. Although in many moments we go into flow mode (so much inspiration that we can’t stop working), we have to take a break. For this, our pomodoro tools or rest budget will help us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9 — Environmental changes&lt;/strong&gt;&lt;br&gt;
Throughout the day we will get tired of our posture or environment. Taking advantage of every corner of our home is key to having a change of light, air and position. That’s why it’s recommended to have a “base” place to work most of the time, but it’s also good to spend some time in the armchair, garden, outside or where we think it’s convenient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;10 — Avoid distractions&lt;/strong&gt;&lt;br&gt;
A great ally of procrastination is distractions. Techniques to control your times are going to help at this point. But you also have to prepare your environment to cover these risks.&lt;/p&gt;

&lt;p&gt;For that reason, try not to have the cellphone around when you work. Notification sounds, even if you put it on vibrate mode, will make you want to check it and know what’s going on.&lt;/p&gt;

&lt;p&gt;Avoid having social networks open all the time, WhatsApp, news. Any of those things are going to distract us and make us lose focus on what we were doing. Don’t be tempted by “just look and don’t answer” because most of the time that triggers major distractions and you can lose between 20 and 30 minutes of your day.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
Many of these points deserve an article on themselves, but in a very short way these tips will help us to keep us productive in our working hours from home and also in the office!&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
