Showing posts with label typescript. Show all posts
Showing posts with label typescript. Show all posts
Tuesday, November 26, 2019

ES6 Recipe: JSON.stringify Map

The keys of a Map can be anything, including objects. But JSON syntax only allows strings as keys...

Let's stringify Map instance to JSON...
Monday, November 25, 2019

TypeScript Recipe: Type Transformations in Practice

Compile-time errors are the best help to avoid mistakes during writing the code and prevent potential runtime-errors

So let's squeeze some juice from Ts Mapped types
Tuesday, June 5, 2018

TypeScript Recipe: Elegant Parse Boolean

There are many ways to convert String to Boolean or Number to Boolean, etc.
Here we will do it all in one and stop worry about form of boolean like parameters we receive from outside.


Lets' Convert 1 '1' and 'true' to true and 0 '0' 'false' null and undefined to false
Thursday, April 5, 2018

React Recipe: Components Error Handling

This article is about the Errors Handling in React Components using TypeScript

Not handled error in any part of the UI could crash the whole application.
Error Boundaries only catch errors in the components below them in the tree.
As of React 16, errors that were not caught by any error boundary will result in unmounting of the whole React component tree.
Catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI.
Use JS error reporting services, so that you can learn about unhandled exceptions as they happen in production, and fix them.
Thursday, June 29, 2017

JavaScript Recipe: Round to a number of decimal places stripping trailing zeros

JS uses binary floating point to handle decimal based operations.
JavaScript calculations with floating point causes the Nonsense cases especially during the result comparisons & displaying.
If the variable was created as a Number, not a String, extra trailing zeros would be dropped automatically.
Friday, March 31, 2017

Angular recipe: Get State updates from Redux

This article is about the possible ways to retrieve your data State in Angular (read 2 or 4) from Redux Store.


It's assumed that you are already familiar with Redux ecosystem. If not click an image below:

Monday, March 6, 2017

Keynote: Quick Creation of Angular2 App

This article is about fast setup & start working on your ng2 application.


The process feels quite similar to Node modules creation through npm CLI commands, but here we will use Angular Command Line Interface (Angular-CLI).

Monday, June 27, 2016

Keynote: Angular2 Basic Short Notes

Angular2


Superheroic, non-opinionated Framework.
Angular delivers the productivity and scalable infrastructure that supports Google's largest applications.
Despite the fact that, new 2.0 version of Angular is focused on ES6 standart and is Not compatible with the 1.4, it's definitely worth to use it.
Angular leverages ES 2015 standards and doesn't force you to stuck with one option.
You can use TypeScript, Dart or JavaScript to write your application.
Friday, June 3, 2016