Add Lifecycle Hooks to a Functional Stateless Component using Recompose
lessonDuration 2m 56s
Learn how to use the 'lifecycle' higher-order component to conveniently use hooks without using a class component.
Browse
Find courses, lessons, articles, talks, and podcasts.
38 resources
Showing 25–38 · Page 2 of 2
lessonDuration 2m 56s
Learn how to use the 'lifecycle' higher-order component to conveniently use hooks without using a class component.
lessonDuration 2m 36s
Learn how to use the 'withReducer' higher order component using the alternative reducer form. If you like using reducers in redux, you’ll be able to reuse that same technique but for local state.
lessonDuration 3m 36s
Learn about optimizations (like component squashing) that Recompose uses behind the scenes. More reading on [Performance](https://github.com/acdlite/recompose/blob/master/docs/performance.md).
lessonDuration 6m 21s
Learn how to use the 'withState' and 'withHandlers' higher order components to easily add local state to—and create a reusable local state pattern for—your functional stateless components. No need for classes!
lessonDuration 3m 46s
Learn how to use the 'compose' function to mix together HOCs, even ones from other libraries like 'connect' from redux.
lessonDuration 3m 15s
Learn the proper patterns for writing a higher order component from scratch.
lessonDuration 2m 41sFree
Riot takes a 'keep your styles close' approach with custom tags. You are encouraged to place your styles for a tags element right inline with the html and javascript. Learn how riot parses the inline styles as well as ways to keep your styles from bleeding out to the rest of your app. Scoped styles provide great isolation for your custom tag. Use the class attribute's special binding syntax to easily add and remove a class based on an expression.
lessonDuration 4m 1sFree
It's easy to repeat over a collection and render many elements. Riot works very similar to Angular and has various syntaxes for it's each attribute. We'll look at the typical syntax for arrays, a shortened syntax, and an object key/value syntax.
lessonDuration 2m 48sFree
Every tag in Riot has a lifecycle. I'll explore the three hooks: mount, update, and unmount while adding an animation feature for an existing tag. Lifecycle hooks are important for setting up, tearing down, and keeping a tag's view up to date after external logic is run.
lessonDuration 2m 49sFree
Riot can listen for raw dom events on any element by adding the on* attribute to elements and referencing an event handler. Let's walk through a couple examples.
lessonDuration 2m 43sFree
Getting started with Riot JS. We'll discuss riot's compile and mount process and build a small hello world component with simple data-binding.
lessonDuration 2m 20sFree
Tag Options allow you to abstract your custom tag elements into reusable objects by allowing the tag-user to specify the dynamic parameters of their component.
lessonDuration 3m 17sFree
ui-router has the powerful ability to define abstract states, or states that can't be navigated to, but are useful for defining a set of states with shared properties.
lessonDuration 4m 4sFree
The ui-router library for AngularJS provides several options for navigating between states in your application. You can navigate via the browser's URL bar, programatically with `$state.go`, and with the ui-sref directive on your HTML elements.