<?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: blindbat</title>
    <description>The latest articles on DEV Community by blindbat (@blindbat).</description>
    <link>https://dev.to/blindbat</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%2F579687%2F859d9e7e-4cf5-48ff-a054-7063ce84c9e4.png</url>
      <title>DEV Community: blindbat</title>
      <link>https://dev.to/blindbat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/blindbat"/>
    <language>en</language>
    <item>
      <title>Why Chakra-UI is your secret lover... Stop denying it</title>
      <dc:creator>blindbat</dc:creator>
      <pubDate>Tue, 29 Mar 2022 14:38:21 +0000</pubDate>
      <link>https://dev.to/blindbat/why-chakra-ui-is-your-secret-lover-stop-denying-it-5b3f</link>
      <guid>https://dev.to/blindbat/why-chakra-ui-is-your-secret-lover-stop-denying-it-5b3f</guid>
      <description>&lt;p&gt;Chakra-UI is a modern component library for react created by Segun adebayo. It comes with accessible, reusable, and composable React components that you need to build front-end applications.&lt;/p&gt;

&lt;p&gt;Chakra-UI uses Emotion and Styled System. Style systems are great kinds of infrastructure that can be used to build a UI component library. They make so many things much easier.&lt;/p&gt;

&lt;p&gt;A great note is that Chakra-UI is typescript friendly and ready for any react app.&lt;/p&gt;

&lt;h1&gt;
  
  
  CREATE-REACT-APP EXAMPLE
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import React from 'react';
import {
  Button
} from '@chakra-ui/react';
import customTheme from "./customTheme";

const App = () =&amp;gt; {
  return (
      &amp;lt;Button colorScheme="facebook" leftIcon={&amp;lt;FaFacebook /&amp;gt;}&amp;gt;
    Facebook
  &amp;lt;/Button&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  TYPESCRIPT EXAMPLE
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';
import { Box } from 'react';

type props = {
   message: string;
};

const flexSettings = {
    flex: "1",
    minW: "300px",
    textAlign: "center",
    color: "white",
    mx: "6",
    mb: "6"
} as const; 

const Message = ({message}: props) =&amp;gt; {

   return (
     &amp;lt;Box {...flexSettings}&amp;gt;
        {message}
     &amp;lt;/Box&amp;gt;
   )
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;STYLED-COMPONENT EXAMPLE USING CHAKRA-UI&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {chakra} from '@chakra-ui/react';

const Card = chakra("div", {
   baseStyle: {
    h: '300px',
    w: '300px',
    rounded: "sm",
    shadow: "lg",
   }
})

...
&amp;lt;Card&amp;gt;
 hello there
&amp;lt;/Card&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>var let and CONST</title>
      <dc:creator>blindbat</dc:creator>
      <pubDate>Tue, 29 Mar 2022 14:37:59 +0000</pubDate>
      <link>https://dev.to/blindbat/var-let-and-const-42lf</link>
      <guid>https://dev.to/blindbat/var-let-and-const-42lf</guid>
      <description>&lt;p&gt;While this assumption might be partially true, it's still possible that some of these features remain a mystery to some devs.&lt;/p&gt;

&lt;p&gt;One of the features that came with ES6 is the addition of let and const, which can be used for variable declaration. The question is, what makes them different from good ol' var which we've been using? If you are still not clear about this, then this article is for you.&lt;/p&gt;

&lt;p&gt;In this article, we'll discuss var, let and const  with respect to their scope, use, and hoisting. As you read, take note of the differences between them that I'll point out.&lt;/p&gt;

&lt;p&gt;Var&lt;br&gt;
Before the advent of ES6, var declarations ruled. There are issues associated with variables declared with var, though. That is why it was necessary for new ways to declare variables to emerge. First, let's get to understand var more before we discuss those issues.&lt;/p&gt;

&lt;p&gt;Scope of var&lt;br&gt;
Scope essentially means where these variables are available for use. var declarations are globally scoped or function/locally scoped.&lt;/p&gt;

&lt;p&gt;The scope is global when a var variable is declared outside a function. This means that any variable that is declared with var outside a function block is available for use in the whole window.&lt;/p&gt;

&lt;p&gt;var is function scoped when it is declared within a function. This means that it is available and can be accessed only within that function.&lt;/p&gt;

&lt;p&gt;To understand further, look at the example below.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter = "hey hi";

function newFunction() {
    var hello = "hello";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here, greeter is globally scoped because it exists outside a function while hello is function scoped. So we cannot access the variable hello outside of a function. So if we do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var tester = "hey hi";

function newFunction() {
    var hello = "hello";
}
console.log(hello); // error: hello is not defined
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We'll get an error which is as a result of hello not being available outside the function.&lt;/p&gt;

&lt;p&gt;var variables can be re-declared and updated&lt;br&gt;
This means that we can do this within the same scope and won't get an error.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter = "hey hi";
var greeter = "say Hello instead";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;and this also&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter = "hey hi";
greeter = "say Hello instead";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Hoisting of var&lt;br&gt;
Hoisting is a JavaScript mechanism where variables and function declarations are moved to the top of their scope before code execution. This means that if we do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log (greeter);
var greeter = "say hello"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;it is interpreted as this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter;
console.log(greeter); // greeter is undefined
greeter = "say hello"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So var variables are hoisted to the top of their scope and initialized with a value of undefined.&lt;/p&gt;

&lt;p&gt;Problem with var&lt;br&gt;
There's a weakness that comes with  var. I'll use the example below to explain:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var greeter = "hey hi";
var times = 4;

if (times &amp;gt; 3) {
    var greeter = "say Hello instead"; 
}

console.log(greeter) // "say Hello instead"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;So, since times &amp;gt; 3 returns true, greeter is redefined  to "say Hello instead". While this is not a problem if you knowingly want greeter to be redefined, it becomes a problem when you do not realize that a variable greeter has already been defined before.&lt;/p&gt;

&lt;p&gt;If you have used greeter in other parts of your code, you might be surprised at the output you might get. This will likely cause a lot of bugs in your code. This is why let and const are necessary.&lt;/p&gt;

&lt;p&gt;Let&lt;br&gt;
let is now preferred for variable declaration. It's no surprise as it comes as an improvement to var declarations. It also solves the problem with var that we just covered. Let's consider why this is so.&lt;/p&gt;

&lt;p&gt;let is block scoped&lt;br&gt;
A block is a chunk of code bounded by {}. A block lives in curly braces. Anything within curly braces is a block.&lt;/p&gt;

&lt;p&gt;So a variable declared in a block with let  is only available for use within that block. Let me explain this with an example:&lt;/p&gt;

&lt;p&gt;let greeting = "say Hi";&lt;br&gt;
   let times = 4;&lt;/p&gt;

&lt;p&gt;if (times &amp;gt; 3) {&lt;br&gt;
        let hello = "say Hello instead";&lt;br&gt;
        console.log(hello);// "say Hello instead"&lt;br&gt;
    }&lt;br&gt;
   console.log(hello) // hello is not defined&lt;br&gt;
We see that using hello outside its block (the curly braces where it was defined) returns an error. This is because let variables are block scoped .&lt;/p&gt;

&lt;p&gt;let can be updated but not re-declared.&lt;br&gt;
Just like var,  a variable declared with let can be updated within its scope. Unlike var, a let variable cannot be re-declared within its scope. So while this will work:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let greeting = "say Hi";
greeting = "say Hello instead";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;this will return an error:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let greeting = "say Hi";
let greeting = "say Hello instead"; // error: Identifier 'greeting' has already been declared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;However, if the same variable is defined in different scopes, there will be no error:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let greeting = "say Hi";
if (true) {
    let greeting = "say Hello instead";
    console.log(greeting); // "say Hello instead"
}
console.log(greeting); // "say Hi"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Why is there no error? This is because both instances are treated as different variables since they have different scopes.&lt;/p&gt;

&lt;p&gt;This fact makes let a better choice than var. When using let, you don't have to bother if you have used a name for a variable before as a variable exists only within its scope.&lt;/p&gt;

&lt;p&gt;Also, since a variable cannot be declared more than once within a scope, then the problem discussed earlier that occurs with var does not happen.&lt;/p&gt;

&lt;p&gt;Hoisting of let&lt;br&gt;
Just like  var, let declarations are hoisted to the top. Unlike var which is initialized as undefined, the let keyword is not initialized. So if you try to use a let variable before declaration, you'll get a Reference Error.&lt;/p&gt;

&lt;p&gt;Const&lt;br&gt;
Variables declared with the const maintain constant values. const declarations share some similarities with let declarations.&lt;/p&gt;

&lt;p&gt;const declarations are block scoped&lt;br&gt;
Like let declarations, const declarations can only be accessed within the block they were declared.&lt;/p&gt;

&lt;p&gt;const cannot be updated or re-declared&lt;br&gt;
This means that the value of a variable declared with const remains the same within its scope. It cannot be updated or re-declared. So if we declare a variable with const, we can neither do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greeting = "say Hi";
greeting = "say Hello instead";// error: Assignment to constant variable. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;nor this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greeting = "say Hi";
const greeting = "say Hello instead";// error: Identifier 'greeting' has already been declared
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Every const declaration, therefore, must be initialized at the time of declaration.&lt;/p&gt;

&lt;p&gt;This behavior is somehow different when it comes to objects declared with const. While a const object cannot be updated, the properties of this objects can be updated. Therefore, if we declare a const object as this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const greeting = {
    message: "say Hi",
    times: 4
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;while we cannot do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;greeting = {
    words: "Hello",
    number: "five"
} // error:  Assignment to constant variable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;we can do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;greeting.message = "say Hello instead";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will update the value of greeting.message without returning errors.&lt;/p&gt;

&lt;p&gt;Hoisting of const&lt;br&gt;
Just like let, const declarations are hoisted to the top but are not initialized.&lt;/p&gt;

&lt;p&gt;So just in case you missed the differences, here they are:&lt;/p&gt;

&lt;p&gt;var declarations are globally scoped or function scoped while let and const are block scoped.&lt;br&gt;
var variables can be updated and re-declared within its scope; let variables can be updated but not re-declared; const variables can neither be updated nor re-declared.&lt;br&gt;
They are all hoisted to the top of their scope. But while var variables are initialized with undefined, let and const variables are not initialized.&lt;br&gt;
While var and let can be declared without being initialized, const must be initialized during declaration.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Requesting data from an API with Rails</title>
      <dc:creator>blindbat</dc:creator>
      <pubDate>Tue, 29 Mar 2022 14:37:47 +0000</pubDate>
      <link>https://dev.to/blindbat/requesting-data-from-an-api-with-rails-47b4</link>
      <guid>https://dev.to/blindbat/requesting-data-from-an-api-with-rails-47b4</guid>
      <description>&lt;h1&gt;
  
  
  I'll be using polygon.io API in the below examples.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Gem to Install
&lt;/h1&gt;

&lt;p&gt;Gemfile:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gem 'faraday'
gem 'json', '~&amp;gt; 2.5', '&amp;gt;= 2.5.1'
gem 'dotenv-rails', groups: [:development, :test]
&lt;/code&gt;&lt;/pre&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0252v336n8mhnknf9qg.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%2Fv0252v336n8mhnknf9qg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Generate Controller &amp;amp; View for making API requests
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails g resource stock
&lt;/code&gt;&lt;/pre&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%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzokd7ldn5pc47ua6e7jr.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%2Fzokd7ldn5pc47ua6e7jr.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Now open /config/routes.rb and add this:
&lt;/h1&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%2Fz590vuyr2a3ei9hr0c6r.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%2Fz590vuyr2a3ei9hr0c6r.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
We'll make API requests using this route and display responses on a browser on the same route.&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%2Fb4ofqmjlqqftz10p2rwt.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%2Fb4ofqmjlqqftz10p2rwt.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Open /app/views/stocks/search and fill it with:
&lt;/h1&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%2Fb0j4w493tidq1ti6lzz6.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%2Fb0j4w493tidq1ti6lzz6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Which gives us a form to enter a ticker whose stock data we can pull from Polygon API. And in the if statement, we have a response variable set to response from API if we made a call in the controller.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if params['stock']
  @response = Searchstock::Search.by_stock(params['stock'])
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Create API module
&lt;/h1&gt;

&lt;p&gt;Now let's actually get into the process of making an API request to Searchstock.&lt;br&gt;
Although we have Faraday installed, it can't be directly called from within the controller.&lt;br&gt;
Add it inside /controller/concerns/searchstock.rb. Make sure not to change the name of the folder.&lt;/p&gt;

&lt;p&gt;I'll create searchstock.rb inside /concerns/searchstock.rb&lt;/p&gt;

&lt;p&gt;The class inside the module and the method inside the class can be named anything.&lt;/p&gt;

&lt;p&gt;From the code above, we can make out that - by calling Searchstock::Search.by_stock method with a ticker parameter would make an API call to Searchstock, but what about ENV['API_KEY']?&lt;br&gt;
We sure can replace ENV['API_KEY'] with Polygon's actual API key, but leaving an API key within the code is not right. So, we are going to place our API key as an Environment variable.&lt;br&gt;
First, let's place the API key as an Environment variable in our local machine.&lt;br&gt;
To do this, we'll be using dotenv gem.&lt;/p&gt;
&lt;h1&gt;
  
  
  Install Dotenv-rails
&lt;/h1&gt;

&lt;p&gt;Add this line to the top of your application's Gemfile:&lt;br&gt;
gem 'dotenv-rails', groups: [:development, :test]&lt;br&gt;
And then execute:&lt;br&gt;
bundle&lt;br&gt;
Now add a file named .env to the root of your application. Make sure not to change the name of the file. Add your API key in the first line like so:&lt;br&gt;
API_KEY=your_api_key&lt;br&gt;
Replace your_api_key with your actual key provided by OpenWeather.&lt;br&gt;
If you're going to commit your work, add the .env file to .gitignore so that git does not track it.&lt;/p&gt;
&lt;h1&gt;
  
  
  Call API from the controller
&lt;/h1&gt;

&lt;p&gt;Now for the final part, add this to the search action of your controller /app/controllers/stock_controller.rb&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if params['stock']
  @response = Searchstock::Search.by_stock(params['stock'])
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to match the names of the module, class, and function that you named earlier.&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%2Ffw4kldgia3yd3qepnitp.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%2Ffw4kldgia3yd3qepnitp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Check the result
&lt;/h1&gt;

&lt;p&gt;Now, open the server&lt;br&gt;
rails server&lt;br&gt;
And visit &lt;a href="http://localhost:3000/stocks/search" rel="noopener noreferrer"&gt;http://localhost:3000/stocks/search&lt;/a&gt; from your browser.&lt;br&gt;
Search for a ticker to see the response.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why CSS Frameworks might be a great choice for your next project</title>
      <dc:creator>blindbat</dc:creator>
      <pubDate>Tue, 29 Mar 2022 14:36:19 +0000</pubDate>
      <link>https://dev.to/blindbat/why-css-frameworks-might-be-a-great-choice-for-your-next-project-4eol</link>
      <guid>https://dev.to/blindbat/why-css-frameworks-might-be-a-great-choice-for-your-next-project-4eol</guid>
      <description>&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%2Fwww.tentononline.com%2Fimages%2FIs-CSS-Easy-To-Learn.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%2Fwww.tentononline.com%2Fimages%2FIs-CSS-Easy-To-Learn.jpg" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is CSS?
&lt;/h1&gt;

&lt;p&gt;CSS stands for Cascading Style Sheets with emphasis on "style." At the same time, HTML is the structure of a webpage. CSS helps create the layout and designs of your project. Without CSS, websites would have trouble looking different from each other. However, using pure CSS is tedious and sometimes stressful to write.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p&amp;gt; this is a paragraph&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&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%2Fmemegenerator.net%2Fimg%2Finstances%2F53041169%2Fwhat-is-a-css-framework-anyway.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%2Fmemegenerator.net%2Fimg%2Finstances%2F53041169%2Fwhat-is-a-css-framework-anyway.jpg" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  How Does CSS Work?
&lt;/h1&gt;

&lt;p&gt;CSS brings style to the webpage by interacting with HTML elements. Individual HTML tags can be considered small components of a more extensive application. CSS can take a &lt;code&gt;p&lt;/code&gt; tag, for example, and change the element's color and size.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p { color: red; }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Why Use a CSS Framework?
&lt;/h1&gt;

&lt;p&gt;Personally, developing a small to midsize application with pure CSS can get out of hand fairly quickly. That’s why it’s crucial to practice and get accustomed to the code. It is a struggle for those who want a beautiful and functional website with limited resources and time. Until recently, I started my journey exploring several CSS frameworks through trial and error. I found what works best for me; however, choose which one is the best for you. Many people will debate on the best CSS framework to use, from Bootstrap with jQuery to Ant Design for React. Choosing the way you design your next project is important and, based on your timeframe, it can make or break your deadline. &lt;/p&gt;

&lt;h4&gt;
  
  
  Pros
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;If you are a small team developing an application with a CSS Framework, you can significantly spend up the development.  Pure CSS can take up much time to create midsize to large applications, so that CSS Framework would be your best bet. &lt;/li&gt;
&lt;li&gt;CSS Framework compatibilities are usually far superior then writing pure CSS from scratch because of the excellent developers working on it and the amount of time and knowledge to work for all browsers. &lt;/li&gt;
&lt;li&gt;As time goes on, CSS frameworks continue to become widely adopted by large and small companies for production use; one example is &lt;a href="https://www.ny.gov" rel="noopener noreferrer"&gt;https://www.ny.gov&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Cons
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Not all CSS frameworks are created equal. Even though talented developers are working on the framework that adoption or community may be affected by the sheer complexity, it's not that great. &lt;/li&gt;
&lt;li&gt;Back then, one famous CSS framework called Bootstrap was known for its excessive use of unused CSS during production, possibly contributing to slowing down performance on your platform. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How to not use Frameworks in Small Projects?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Flex&lt;br&gt;
Since flexbox is a whole module and not a single property, it involves many things, including its whole set of properties. Some of them are meant to be set on the container (parent element, known as “flex container”), whereas the others are meant to be placed on the children (said “flex items”). (&lt;a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" rel="noopener noreferrer"&gt;https://css-tricks.com/snippets/css/a-guide-to-flexbox/&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Grid&lt;br&gt;
CSS Grid Layout (aka “Grid”) is a two-dimensional grid-based layout system that aims to do nothing less than completely change the way we design grid-based user interfaces. (&lt;a href="https://css-tricks.com/snippets/css/complete-guide-grid/" rel="noopener noreferrer"&gt;https://css-tricks.com/snippets/css/complete-guide-grid/&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fexternal-preview.redd.it%2FCXNH349yHDqv1AZi8MxnWUvbjS-nGTpk_u7ASmxT96U.png%3Fauto%3Dwebp%26s%3D6429ff0351d945ec942d6f554777a68eb449171f" 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%2Fexternal-preview.redd.it%2FCXNH349yHDqv1AZi8MxnWUvbjS-nGTpk_u7ASmxT96U.png%3Fauto%3Dwebp%26s%3D6429ff0351d945ec942d6f554777a68eb449171f" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;In conclusion, if you're trying to run away from CSS, unfortunately, there is nowhere to go. Pure CSS is a fantastic thing to learn, and having the skills to turn an HTML website into a beautiful website is a must. CSS frameworks make CSS a little bit more enjoyable. &lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
