Publish a Custom React Hook as an npm Package
lessonDuration 1m 13s
The final step in our journey is publishing our custom hook as an npm package. In this video, we'll see how to login to the npm cli and publish our package to the npm registry.
Browse
Find courses, lessons, articles, talks, and podcasts.
7,176 resources
Showing 3,001–3,024 · Page 126 of 299
lessonDuration 1m 13s
The final step in our journey is publishing our custom hook as an npm package. In this video, we'll see how to login to the npm cli and publish our package to the npm registry.
lessonDuration 58sFree
In this lesson we look at how we can run tests inside of an Nx Workspace project, allowing you to test a specific library, or the whole project.
lessonDuration 4m 15s
As we develop our pattern further, we can see how it can apply to all async scenarios in JavaScript. All user events go through addEventListener, so making sure we have control over how addEventListener interacts with other APIs, like setTimeout, gives us confidence in our pattern moving forward.
lessonDuration 1m 23s
Sometimes we want to be able to reuse different styles across components and to create generic stylesheets that we can use in various scenarios. In this lesson we're going to learn how to assign multiple styles to a `<Text />` component in React 360 building a list of countries that the user would like to visit.
lessonDuration 1m 6s
In this lesson we are going to learn how to use flexbox in React 360 in order to create a list of countries that the user would like to visit
lessonDuration 2m 29s
Native Modules provide the ability for React 360 app code to call back into your runtime, and provide functionality that's only available in the main browser environment. In this lesson we're going to learn how to create a `TitleChanger` module that will allow us to change the document title whenever we travel to a different place in our app
lessonDuration 3m 10s
Surfaces allow you to add 2D interfaces in 3D space, letting you work in pixels instead of physical dimensions. Currently there are two different shapes of Surfaces supported by React 360: Cylinder and Flat. A Flat Surface places your 2D interface on a flat plane in space, like a virtual screen. Though a Cylinder Surface is always positioned in front of the user, a Flat Surface can be moved around in space – this is useful for scenarios where you want to have multiple panels arranged around the user, like a multi-monitor setup in virtual space. In this lesson we are going to learn how to create a Flat Surface with a `<Flag/>` component attached to it.
lessonDuration 2m 59s
Surfaces allow you to add 2D interfaces in 3D space, letting you work in pixels instead of physical dimensions. Currently there are two different shapes of Surfaces supported by React 360: Cylinder and Flat. A Cylinder Surface takes your 2D content and projects it onto the inside of a cylinder with a 4 meter radius. A cylinder is great for displaying 2D content, because no matter which way you turn, you are always looking at the content straight-on. In this lesson we are going to learn how to create a Cylinder Surface spanning the 360 degree view and how to attach a React 360 component to it.
lessonDuration 2m 2s
In blocking rendering, all updates have the same priority. In Concurrent Mode, work is "interruptible". And user-blocking updates are treated with highest importance. To keep interfaces interactive and snappy, we can de-prioritize slower updates. The useTransition Hook — and its startTransition function — allows React to schedule work after higher priority work.
lessonDuration 1m 23s
Concurrent Mode is a completely different rendering paradigm for React. It changes something that has remained constant since the first version of React: `ReactDOM.render`. To use Concurrent Mode, we use `ReactDom.createRoot`. It's API is slightly different then the old faithful `ReactDOM.render` but, with this one change, we can access the future of React.
lessonDuration 1m 22sFree
In this lesson, you'll learn how to use a newly created custom Github Action in a separate Github repository. We'll walk through configuring a new workflow, how to find the configuration details of your new Action, and successfully run it on a project.
lessonDuration 1m 24s
To poke around in old code, we can checkout the hash of an old commit with `git checkout [HASH]` - but then we'll be in a "detached HEAD" state. Detached HEAD just means that HEAD is not pointing to a branch. That's problematic if we want to save the work that we do in that state - so we first have to make a new branch where we are with `git checkout -b my-new-branch` Then, any changes we make can be committed to that new branched and saved.
lessonDuration 1m 23s
If you want to pull over just a single commit from one branch onto another, you can do that with `git cherry-pick [HASH-TO-MOVE]` We'll demonstrate that by making a commit on a feature branch, and then copying that commit (but not the entire branch) onto master.
lessonDuration 1m 56s
We're going to pick a previous commit and enter an interactive rebase with: `git rebase -i HEAD~2` and change the word `pick` to `edit` on the commit where we want to add a file. Then during the interactive rebase, we can add the file, and amend the commit we stopped on with: `git commit --amend --no-edit` and then once we're happy, continue the rebase with: `git rebase --continue`
lessonDuration 2m 52s
`git reset` has three primary options that we might use: `--soft`, `--hard` and `--mixed` (the default). We'll use `git reset` to undo the latest commit in all three ways, and compare the result of reseting with each flag.
lessonDuration 4m 3sFree
Git rebase is a super powerful tool, but one many devs shy away from for fear of messing up history. But when you know how to use it safely, you can make your pull requests much easier to understand and reason about. For anyone interested in the gn log alias I use in this video, it's this: git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lessonDuration 1m 39sFree
Optimizing images is key. There's no point in serving a multiple megabyte sized high resolution images when the consumer always just sees them scaled down and embedded within your app. At that point, you might want to compress your image. In this lesson I'm quickly showcasing how you can use the squoosh.app web application to quickly compress an image.
lessonDuration 4m 27sFree
Let's add another layer of wrapping so that we can override the behavior of broadcasters. Operators are the final big piece that allows us to bend all asynchronous behaviors to our will. The give us a chance to redefine broadcasters and listeners in any way we want.
lessonDuration 3m 4s
As one of the most commonly asked interview questions, "What is the this keyword"? This lesson focuses on how you can explicitly bind the context of your function to a specific object. Thus making it obvious what the "this" context will be. We review the call, apply, and bind prototype method and work to understand how they bind the "this" context explicitly.
lessonDuration 1m 29s
Classes are syntactic sugar over functions and functions are also referred to as "callable" objects. So it is possible to treat a function like an object and give them key / value properties like objects. The `static` keyword gives us the ability to assign a key / value property to a class itself, not an instance of that class. This lesson will walk you through using the static keyword and even show how to replicate it with regular functions.
lessonDuration 2m 30s
Coercion can be a scary word for many developers today. The inventor of JavaScript himself has publicly stated that some of the rules around coercion is the biggest thing he regrets about JavaScript. Simply put, coercion is the conversion of one type to another type. It happens implicitly in our code and there are also many ways to explicitly coerce our types. This lesson is designed to show you both types of coercion in action.
lessonDuration 1m 35s
Strict mode catches silent errors and throws them, fixes mistakes that can make it difficult for JavaScript engines to perform optimizations, and prohibits some syntax likely to be defined in future versions of ECMAScript. It can be used within entire scripts or to individual functions (does not apply to block statements). In this lesson we talk about some of these strict mode catches and see how to implement strict mode.
lessonDuration 5m 19sFree
Sometimes we want to conditionally render a child component based on some internal component state. In the case of inline editing, we need to be able to swap a component's rendered output between the read-only view of the data and the form for editing the data. In this lesson, we'll do exactly this, updating state based on user input and determining which of two components we should render based on that state value.
lessonDuration 3m 54sFree
YugabyteDB can automatically handle failures and therefore provides high availability . You will create YSQL tables with a replication factor (RF) of 3 that allows a fault tolerance of 1. This means the cluster will remain available for both reads and writes even if one node fails. However, if another node fails bringing the number of failures to two, then writes will become unavailable on the cluster in order to preserve data consistency. In this lesson we will see how fault tolerance is tested by using workload sample app and by stopping nodes in the local cluster. [Written instructions to get up and running.](https://gist.github.com/vnovick/06881138644641b4909983b5d9356dbc)