JSK Weekly - August 7, 2019

Did you know that apart from a leap year, August never starts on the same day of the week as any other month but always ends on the same day of the week as November? Just in case anyone was bored. Back to business, then!

Fernando Doglio takes us through how, thankfully, ES6 has implemented a native Promise object, allowing everyone to ditch the third-party implementations in "JS Promises: race vs all vs allSettled" and Praveen Kumar teaches us how to generate, decode, and validate JWT on LogRocket's server in his first instalment "Creating a full-stack MERN app using JWT authentication: Part 1".

If you're looking to hire a TypeScript developer, Jeroenouw offers up some advanced TypeScript questions in "10 Advanced TypeScript Questions For An Interview — With Answers", while Adhithi Ravichandran shares valuable insight in "10 Lessons I Learned Using React Native", all on gitconnected.

Bits and Pieces goes full Angular (among other things) this week with an exciting announcement by Jonathan Saring introducing public beta for Bit with Angular 8+ in "Announcing Bit with Angular Public Beta" and Chidume Nnamdi writing about Best Practices in "Building Reusable Angular Components: Best Practices" and Performance in "Angular Performance: Web Workers."


General

Beyond cookies: Today's options for client-side data storage Blog

When they were first introduced, cookies were the only way for a browser to save data. Since then, there have been new options added - the Web Storage API, IndexedDB, and the Cache API among them. So, are cookies dead? Let's take a look at each of the options for storing data in your browser.

Authored by: LogRocket

How to use subjects to multicast observers in RxJS Blog

RxJS is a framework for reactive programming that makes use of observables, which makes it really easy to write asynchronous code. According to the official documentation, this project is a kind of reactive extension to JavaScript with "better performance, better modularity, better debuggable call stacks, while staying mostly backwards compatible, with some breaking changes that reduce the API surface."

Authored by: LogRocket

JS Promises: race vs all vs allSettled Blog

Promises have been around for a while now, but up until ES6, we were forced to use them through a third-party library, and the implementations and APIs varied a bit from one another. Thankfully, ES6 came and standardized the API by implementing a native Promise object, allowing everyone to ditch the third-party implementations.

Authored by: LogRocket


JavaScript

Must-Know JavaScript Frameworks For Developers

Did you know, using JavaScript is the most popular and simplest way to develop web apps in the browser? The magic of the Nodejs in addition to the JavaScript is that you can create on the server side too! Along with CSS and HTML, JavaScript is one of the 3 major things of the www (World Wide Web).

Authored by: Bit

Creating a full-stack MERN app using JWT authentication: Part 1 Blog

JSON Web Token is today's trending tech in authentication. In part one of our tutorial, learn how to generate, decode, and validate JWT on our server.

Authored by: LogRocket

Three different ways to loop through JavaScript objects

Learn how to loop through objects in Javascript. Using for..in With ES6, we can use Object.entries to loop through each entry of the object. The Object.entries method returns an array of [key, value] . We can also use Object.keys which will return an array filled with keys of the object.

Authored by: jagathish

Interesting use cases for JavaScript bitwise operators Blog

JavaScript provides several kinds of operators, making it possible to carry out basic operations on simple values such as arithmetic operations, assignment operations, logical operations, bitwise operations, etc. We often see JavaScript code that contains a mix of assignment operators, arithmetic operators, and logical operators.

Authored by: LogRocket


TypeScript

10 Advanced TypeScript Questions For An Interview - With Answers

Check if your candidate is capable of answering these more advanced TypeScript questions Answer: It's a new type where you can define some properties to be excluded from the original type.

Authored by: gitconnected

Setting up ESLint with Prettier, TypeScript, and Visual Studio Code

When appropriately configured, ESLint and Prettier can optimize your TypeScript development workflow in Visual Studio Code. Getting things set up correctly can be a bit challenging, but hopefully, this guide will help. The examples below will use the popular Airbnb preset with modifications to make it work with TypeScript and Prettier.

Authored by: Sean Marchetti


Angular

Angular Performance: Web Workers

Web apps would run better if heavy computations could be performed in the background, rather than compete with the user interface. We need all apps to be very fast and highly responsive. Like lightning fast and responsive. So in that way, we have researched and found many ways of making our apps very fast, to keep our users.

Authored by: Bit

Announcing Bit with Angular Public Beta

Special thanks to the awesome Angular team and Stephen Fluin for working together on making this happen 👐 We're excited to introduce public beta for Bit with Angular 8+. You can now share Angular components between different projects and collaborate over components as a team to build your applications faster together.

Authored by: Bit

Building Reusable Angular Components: Best Practices

Components are the basis of modern SPAs (Angular, Vue, React). They are the simplest building blocks of SP applications. A SPA app is a tree of components, it starts with the root component, going up spreading into multiple branches.

Authored by: Bit

Optimizing Events handling in Angular

Angular provides a handy declarative way to subscribe to an even inside a template using (eventName)="onEventName($event)" syntax. Combine that with ChangeDetectionStrategy.OnPush and you get change detection cycles ran only on events we are interested in. In other words, if we listen to (input) event on an element - we are not going to have change detection ran if user simply clicks on it.

Authored by: Angular In Depth


React

Making API Calls with React Hooks

With the new updates coming up in the React library, it's indeed impossible to use all the new React features in your application. It's been 6 months since the official release of React Hooks which was released with React 16.8.0 (February 6, 2019) This article will help you take the baby steps in using React Hooks, it will explain all the basic approach which you can take to make the most out of this beautiful feature.

Authored by: Bit

10 Lessons I Learned Using React Native

I spoke last month at the wonderful Chain React conference at Portland. Thanks to Infinite Red team for putting up this great show and compiling the video as well. Do checkout my talk, on the 10 Lessons I Learned Using React Native, and feedback is welcome!

Authored by: Adhithi Ravichandran

How to Trigger Animation Events using React

Learn the simplest way to listen to CSS animation events in ReactJS. Animations play an important role in improving User Experience by making it smooth and pleasant to use. There is no doubt that this has become part of every User Interactions on apps that we use everyday.

Authored by: Bit

Create a Query Param Login Modal Route with React Router

Routes are some times better served as a modal.

Authored by: Code Daily


Aurelia

Advanced i18n with Aurelia and Net at Work GmbH

Net at Work GmbH [https://www.netatwork.de/] is a product-based consultancy company with a glowing feather in its cap: NoSpamProxy [https://www.nospamproxy.de/en/]. NoSpamProxy is a multi-faceted secure email gateway solution aimed at providing powerful anti-spam and anti-malware capabilities. Moreover, it provides a number of other functionalities such as email encryption, large file transmission, and email disclaimer management.

Authored by: Aurelia


Vue

Vue.js 3: Future-Oriented Programming

How function-based API solves logic reusability problem If you are interested in Vue.js, you probably know about the 3rd version of this framework, which will be released shortly (if you are reading this article from the future, I hope it's still relevant 😉).

Authored by: Bit


Node.js

Handling and dispatching events with Node.js Blog

At its core, Node.js is an open-source runtime environment built for running JavaScript applications on the server side. It provides an event-driven, non-blocking (asynchronous) I/O and cross-platform runtime environment for building highly scalable server-side applications using JavaScript. This is not going to be an introduction guide to Node.js; to learn more, you can check out the official docs or video tutorials on YouTube.

Authored by: LogRocket

Setting the Node.js Version for an Azure DevOps Build

I recently ran into a Node.js version issue in one of my Azure DevOps build pipelines. The build step executing yarn install failed with the following error message: error [email protected]: The engine "node" is incompatible with this module. Expected version ">=8.6".

Authored by: Marius Schulz


Functional Programming

Function Results Are Returned By Value When Using CachedWithin In Lucee 5.3.2.77

Ben Nadel continues to dig into the Function memoization features of Lucee CFML 5.3.2.77, demonstrating that returned values are returned by-value, not by-reference. This is true even for complex objects, like Arrays, Structs, and ColdFusion Components, which are typically passed around by-reference.

Authored by: Ben Nadel


Other

A Guide to Streams in PHP: In-Depth Tutorial With Examples

You've already used PHP streams in your PHP development. However, they're transparent, so you may not have noticed them. Streams are powerful tools. In this article, you'll learn to harness the power of streams in your PHP development and take your applications to the next level. Streams provide on-demand access to data.

Authored by: Stackify

New in Chrome 76: the frosted glass effect with backdrop-filter Blog

Have you ever wanted to recreate that typical frosted glass effect/background blur from iOS devices on the web? The newest release of Google Chrome makes it possible with just a couple lines of CSS, thanks to the implementation of the backdrop-filter property!

Authored by: LogRocket





0 comments