O'Reilly logo

JavaScript at Scale by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Mapping resources to URIs

It's time to look at URIs in action. The most common form we'll find URIs in, are as links inside our application. At least, that's the idea; to have an application that's well connected. While the router understands what to do with URIs, we are yet to look at all the places where these links need to be generated and inserted into the DOM.

There are two approaches to generate links. The first is a somewhat manual process that requires the help of template engines and utility functions. The second takes a more automated approach in an attempt to scale the manageability of many URIs.

Building URIs manually

If a component renders content in the DOM, it potentially builds URI strings and adds them to link elements. This is

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required