What is the difference between HTML and React event handling?

In HTML, the attribute name is in all lowercase and is given a string invoking a function defined somewhere: In React, the attribute name is camelCase and are passed the function reference inside curly braces: In HTML, false can be returned to Continue reading What is the difference between HTML and React event handling?

What is the difference between em and rem units?

Both em and rem units are based on the font-size CSS property. The only difference is where they inherit their values from. em units inherit their value from the font-size of the parent element rem units inherit their value from the font-size of the root element (html) In most browsers, the font-size of the Continue reading What is the difference between em and rem units?

What are the advantages of using CSS sprites and how are they utilized?

CSS sprites combine multiple images into one image, limiting the number of HTTP requests a browser has to make, thus improving load times. Even under the new HTTP/2 protocol, this remains true. Under HTTP/1.1, at most one request is allowed Continue reading What are the advantages of using CSS sprites and how are they utilized?

Eloquent ORM – Increments and Decrements

Eloquent ORM seems like a simple mechanism, but under the hood, there’s a lot of semi-hidden functions and less-known ways to achieve more with it. First example :: Increments and Decrements Instead of this: $article = Article::find($article_id);
$article->read_count++;
$article->save();
 You can do Continue reading Eloquent ORM – Increments and Decrements