Dynamically style an input border with Tailwind and ReasonReact
lessonDuration 3m 4sFree
This lessons shows how to dynamically add a red border to an input when a validation error pops occurs using ReasonReact, Tailwind, and re-classnames.
Browse
Find courses, lessons, articles, talks, and podcasts.
14 resources
lessonDuration 3m 4sFree
This lessons shows how to dynamically add a red border to an input when a validation error pops occurs using ReasonReact, Tailwind, and re-classnames.
lessonDuration 2m 8sFree
Decco is a language extension that automatically generates JSON encoders and decoders from type signatures. When adding adding custom Decoders, the error messages that the compiler produces can be quite confusing. This lesson shows the viewer how to use explicit type signatures to narrow down where an error might be coming from in custom codec code. This same pattern can be applied whenever confusing error messages come from code that is written without explicit type signatures.
lessonDuration 5m 6sFree
Although ReasonML has built-in libraries for working with JSON, they are low-level and difficult to use by hand. The Decco library offers automatically generated JSON decoders, and produce a result that keeps the programmer safe at runtime by telling them whether the data they got matched the shape of the data they expected.
lessonDuration 4m 58sFree
ReasonML is a fantastic way to write Javascript! But it doesn't yet have a built-in async / await syntax. Furthermore the built-in libraries for working with Javascript promises are awkward to work with, and produce code that's hard to read. This lesson will teach the viewer how to use the "bs-let" language extension (called a PPX) to achieve readable, easy to write promise-based code.
lessonDuration 3m 40sFree
This lesson shows how the Serbet server library for ReasonML and Node.js makes handling JSON request bodies, and responding with JSON request bodies a simple task.
lessonDuration 4m 10sFree
Decco is a great library for automatically generating JSON encoders and decoders, but most real-world projects will quickly run into the need to add custom data types that Decco doesn't ship with support for. This lesson shows how to simply add a custom data type by implementing a codec that reads and writes Javascript dates as floats.
lessonDuration 4m 53sFree
This lesson shows how to use the `serbet` npm package to write a simple Node.js http server in ReasonML by implementing a simple "hello world" endpoint. Serbet is a convenient wrapper around Express.js. It's a young library, but its patterns are already used in production code.
course
Node.js is a well established server runtime that many companies are using worldwide. Express.js is a server framework for Node.js used by over 5 million projects. ReasonML is a type-safe functional language that compiles to Javascript. This playlist collects the basic pieces of information a programmer needs to get started building servers in ReasonML on Node.js and Express.js. Follow along to learn how to get the speed of Node, combined with the added type-safety of Reason.
lessonDuration 10m 10sFree
Turning JSON strings into types, also known as JSON Decoding is an important part of using Elm. It allows the programmer to use json-encoded data while staying completely aware of when the JSON might not match the programmer's expectations, all without throwing a run-time error! This lesson will show the viewer how to turn a simple JSON object into an analogous Elm record and use it to render some content to the screen.
lessonDuration 13m 1sFree
Understand the three basic parts of making HTTP requests in Elm: 1) Building the request, 2) Writing a JSON decoder, 3) Sending the request using the Elm runtime, and reacting to the results with messages. HTTP requests are just pieces of data in Elm. When we want to send them, we hand them off to Elm's runtime, and it notifies us when the request is done. An important part of working with HTTP requests that fetch JSON is JSON decoding, the process by which we can turn untyped JSON data into Elm types that are safe to work with. Specs: - Editor: Atom - Theme: [Nebula (with Nebula syntax theme)](https://atom.io/themes/nebula-ui) - Font: [Iosevka with ligatures enabled](https://github.com/be5invis/Iosevka) - Plugin used for imports: [Elmjutsu](https://atom.io/packages/elmjutsu) - Plugin used for formatting: [Elm-format](https://atom.io/packages/elm-format) - Plugin used for linting: [linter-elm-make](https://atom.io/packages/linter-elm-make)
lessonDuration 5m 21sFree
Decoding JSON strings in Elm is a 2-step process: 1. Create a "recipe" for the decoding 2. Perform the decoding This lesson gives a couple basic examples of the two steps in action.
lessonDuration 5m 34sFree
**Notice**: This lesson uses Elm 0.17! [Here's a document about the important differences between 0.16 and 0.17](https://github.com/elm-lang/elm-platform/blob/master/upgrade-docs/0.17.md). This lesson gives a rapid-paced introduction to what's known as the Elm Application Architecture. You can read about it in greater detail here: [guide.elm-lang.org](http://guide.elm-lang.org/architecture/index.html). We'll build a counter that utilizes the standard Elm combination of a model, a view, and update function. See the linked code for a good starting place.
lessonDuration 4m 22sFree
Elm includes a data type called `Maybe` which is useful for working with values that may, or may not exist. This lesson shows a simple case where maybe types are encountered, and how to make them useful.
lessonDuration 3m 50sFree
This lesson will take you from nothing to a small Elm app that prints text to the browser.