showing 14 lessons...
fromPairs functions, along with the crucial
We don't always control the data we need in our applications, and that means we often find ourselves massaging and transforming our data. In this lesson, we'll learn how to transform objects in a declarative way using ramda's evolve function.
In this lesson we'll take an array of objects and map it to a new array where each object is a subset of the original. We'll look at multiple ways to accomplish this, refactoring our code into a simple and easy to read function using Ramda's
Most of the functions offered by the ramda library are curried by default. Functions you've created or that you've pulled in from another library may not be curried. Ramda's
curryN functions allow you to take a non-curried function and use it as a curried functions. In the case where you have a manually curried function and you want to just call it like a normal function, you can use
uncurryN to get back a function that accepts all of the arguments at once.
When you want to build your logic with small, composable functions you need a functional way to handle conditional logic. You could wrap ternary expressions and if/else statements in functions, handling all of the concerns around data mutation yourself, or you could leverage the conditional functions supplied by Ramda. In this lesson, we'll cover several of Ramda's conditional functions:
In this lesson, we'll use
next to create a universal React application with no configuration. We'll create page components that will render on the server if accessed directly, but function as you would expect in the client. We'll use the routing capabilities included with
next to create links between the components using
pushState and we'll incorporate our own React component. Finally, we'll deploy the application to
now with a simple command in the terminal.
Sometimes you need to filter an array of objects or perform other conditional logic based on a combination of factors. Ramda's
where function gives you a concise way to declaratively map individual predicates to object properties, that when combined, cover the various facets of your conditions. In this lesson, we'll look at how this powerful function can be used for scenarios requiring a complex predicate function.
Now is a great way to deploy your node application, but the generated URLs aren't memorable or easily remembered. With Now's alias command, you can fix that. In this video lesson we'll cover how to add an alias to a deployment, giving you a custom
*.now.sh subdomain, how to create an alias using your own custom domain name, how to list your aliases and finally how to remove an alias if you no longer want it.
Applications require a lot of sensitive information. Database passwords, API keys and secrets used for signing JWTs, just to name a few. If you're deploying your application using the Now CLI, you can deploy your secret information right through the CLI and give your code access to those secrets without exposing them directly in your source code. In this lesson, we'll cover how to add secrets to now, how to use a secret as the value of an environment variable and how to list and remove secrets in now.
Now offers a friction-free way to deploy node applications right from the terminal. In this lesson, we'll learn how to use the now CLI to deploy a node application, including the deployment of environment variables. We'll also look at how now retains each version of your application, how to see the running code right in the browser and how to remove a deployment when you no longer want that version.
We'll learn how to get a subset of an array by specifying items to include with filter, or items to exclude using reject. We'll also look at how to get the results from both filter and reject, neatly separated with partition.