hello.js

var please = require('share');
console.log('thank you');

NEW !!!

Wednesday, 5 May, 2021 UTC

css: Use Chrome Devtools' CSS Overview to debug the CSS Design of a website

Chrome Devtools can be really powerful, when it comes to debug JavaScript, inspect DOM nodes and their properties as well as CSS styling. in this lesson we're quickly having a look at the "CSS Overview" feature of Chrome Devtools, that allows ... more


Tuesday, 27 April, 2021 UTC

typescript: Create Private Class Fields Using TypeScript's private Modifier

In this lesson, we're going over how to create private class fields using TypeScript's `private` modifier. However, as we're going to see, the `private` modifier doesn't give us any actual protection at runtime; it only exists in TypeScript's type system ... more


Tuesday, 27 April, 2021 UTC

typescript: Implement a NonNullish<T> Conditional Type in TypeScript

In this lesson, we're going to learn about conditional types, a powerful feature of TypeScript's type system. Conditional types let us express non-uniform type mappings, that is, type transformations that differ depending on a condition. A conditional ... more


Tuesday, 27 April, 2021 UTC

typescript: Create Truly Private Class Fields Using the #fieldName Syntax

This lesson introduces private class fields which (unlike regular class fields) cannot be examined or modified outside of the class they're defined in. We're going to contrast private class fields with TypeScript's `private` modifier and public class ... more


Tuesday, 27 April, 2021 UTC

typescript: Encapsulate Truly Private Variables in a Closure

Closures are an alternative to truly private class fields. If you need to encapsulate a private variable so that it can only be accessed in a controlled way, you can use a closure. This technique is particularly useful when your code has to run in older ... more


Tuesday, 27 April, 2021 UTC

typescript: Statically Type String Literals with Template Literal Types in TypeScript

In this lesson, we're going to explore template literal types, another powerful feature of TypeScript's type system. Template literal types have the same syntax as template literals in JavaScript, but they're used in type positions. Using template literal ... more


Tuesday, 27 April, 2021 UTC

typescript: Use TypeScript's Mapped Types and Template Literal Types Together

In this final lesson, we're going to dive deep into a more complex example in which we combine mapped types, key remapping, template literal types, and indexed access types to statically type a highly dynamic JavaScript function in TypeScript. ... more


Tuesday, 27 April, 2021 UTC

typescript: Use the Nullish Coalescing Operator in TypeScript

This lesson introduces the `??` operator which is known as [nullish coalescing](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_operator). The `??` operator produces the value on the right-hand side if (and ... more


Tuesday, 27 April, 2021 UTC

typescript: Use the Optional Chaining Operator in TypeScript

This lesson introduces the `?.` operator which is known as [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining). We're going to look at how we can use `?.` to safely descend into an object ... more


Tuesday, 13 April, 2021 UTC

javascript: Use JavaScript Array Destructing to Name Array Indexes

You can use array destructing to access values like string and functions and give them names your prefer without using bracket notation. ... more


Tuesday, 13 April, 2021 UTC

javascript: Extract properties from JavaScript Object Destructuring

JavaScript Destructuring assignment syntax allows you access properties from objects and name them like variables ... more


Friday, 26 March, 2021 UTC

aws: Install Ghost CLI and Create Directory

To run Ghost, we first need to install the ghost cli. This can be done with npm now that Node.js is installed on the server. After installing the CLI we will create a directory `/var/www/ghost` that the actual installation of Ghost will occur in. We'll ... more


Wednesday, 24 March, 2021 UTC

javascript: Master the JavaScript Interview

Unfortunately, the JavaScript interview has turned into a, "who knows the buzzwords". Forget about your skills with React, CSS, or modern tooling, the real question is can you explain the Big O Notation of a binary search? This talk is designed ... more


Tuesday, 23 March, 2021 UTC

rust: Creating a library crate to support a Rust binary crate in the same package

In our subcommand match we'll add a new function called `write` to handle our `Write` subcommand. We'll pass it the argument title and we'll "import" it from a library called `digital_garden`. ```rust use digital_garden::write; fn main() -> ... more


Tuesday, 23 March, 2021 UTC

rust: Initialize a new Cargo binary crate in a new package

```shell cargo init ``` By default cargo initializes a new package containing a *binary* crate. The file that gets compiled into the binary is located at `src/main.rs`. This is by convention and we can specify different paths and names for binaries. We ... more


Tuesday, 16 March, 2021 UTC

[Course] egghead: Build a Serverless API with Cloudflare Workers

Cloudflare Workers let you write JavaScript Service Workers that run directly in Cloudflare's 120+ edge locations around the world. With a Cloudflare Worker, you can modify your site's HTTP requests and responses, make parallel requests, and even reply ... more


Thursday, 11 March, 2021 UTC

graphql: Securing GraphQL Backends with JWTs

Are you confused about how authentication and authorization relate to GraphQL APIs? You’re not alone! It’s no secret that learning auth is hard on its own, let alone on top of GraphQL. Let’s demystify auth while learning how to use JSON Web Tokens (JWTs) ... more


Tuesday, 2 March, 2021 UTC

javascript: Deploy a React App to AWS in 24 seconds

In this video you'll learn how to deploy a React app to AWS using AWS Amplify Hosting's drag and drop folder functionality. The app will also automatically be globally distributed on AWS's global CDN. ... more


Saturday, 6 February, 2021 UTC

react: Create a Debounced Event Handler with the useMemo Hook

Our class-based component relies on instance variables to ensure it's only created once. ``` this.amountChanged = debounce(this.props.changeAmount, 500); ``` Functional components aren't classes and therefore don't have instance variables. Because of ... more


Saturday, 6 February, 2021 UTC

react: Replacing Instance Variables with the useRef Hook

In addition to storing DOM references, the [useRef](https://reactjs.org/docs/hooks-reference.html#usecallback) hook can be used to store values without re-rendering the component. If you have a class component that stores and manipulates values using ... more


Saturday, 6 February, 2021 UTC

react: Replacing Component Lifecycle Methods with the useEffect Hook

The [useEffect](https://reactjs.org/docs/hooks-effect.html) hook provides a way for components to declaratively state side effects that need to be run. By modifying the dependency array you can simulate certain React lifecycle methods such as `constructor`/`componentDidMount` ... more


Saturday, 6 February, 2021 UTC

react: Migrate React Component State to the useState Hook

In this lesson we convert our AmountField class component to a function component and then convert its state from `this.state`/`this.setState` to the [useState](https://reactjs.org/docs/hooks-state.html) hook. As in our earlier lesson we apply the following ... more


Saturday, 6 February, 2021 UTC

react: Migrating DOM refs from createRef() to useRef()

In this lesson we replace `React.createRef()` with the `React.useRef` hook. The API is almost identical, so the there's not much to it, if you're already familiar with refs. In React, refs provide a way to store references to native DOM elements. Throughout ... more


Saturday, 6 February, 2021 UTC

react: Cleaning up our Functional Components with Custom Hooks

In this lesson we take all of the hooks and logic from our `` component and put them into a custom hook called `useCurrencyCodes()`. What's the difference between a custom hook and a function we can use to organize our logic? Not much, really. Because ... more


Saturday, 6 February, 2021 UTC

react: Avoiding Accidental Re-Renders with the useCallback Hook

With React hooks it's common to write callback functions in our component body. Event handlers are a common example of this. Most of the time they work great, however, when you're passing those event handlers down to a child component or using them as ... more


Saturday, 6 February, 2021 UTC

react: Cleaning up our Functional Components with Custom Hooks

In this lesson we take all of the hooks and logic from our `` component and put them into a custom hook called `useCurrencyCodes()`. What's the difference between a custom hook and a function we can use to organize our logic? Not much, really. Because ... more


Saturday, 6 February, 2021 UTC

react: Avoiding Accidental Re-Renders with the useCallback Hook

With React hooks it's common to write callback functions in our component body. Event handlers are a common example of this. Most of the time they work great, however, when you're passing those event handlers down to a child component or using them as ... more


Saturday, 6 February, 2021 UTC

react: Replacing Component Lifecycle Methods with the useEffect Hook

The [useEffect](https://reactjs.org/docs/hooks-effect.html) hook provides a way for components to declaratively state side effects that need to be run. By modifying the dependency array you can simulate certain React lifecycle methods such as `constructor`/`componentDidMount` ... more


Saturday, 6 February, 2021 UTC

react: Replacing Instance Variables with the useRef Hook

In addition to storing DOM references, the [useRef](https://reactjs.org/docs/hooks-reference.html#usecallback) hook can be used to store values without re-rendering the component. If you have a class component that stores and manipulates values using ... more


Saturday, 6 February, 2021 UTC

react: Migrating DOM refs from createRef() to useRef()

In this lesson we replace `React.createRef()` with the `React.useRef` hook. The API is almost identical, so the there's not much to it, if you're already familiar with refs. In React, refs provide a way to store references to native DOM elements. Throughout ... more