January 2018
Intermediate to advanced
336 pages
7h 22m
English
Now that you have your Router implemented and protected by authentication checks, it’s time to tack on the UI components to make it work end to end. The code for this is quite similar to the UI code you developed in Chapter 8, Creating a Beautiful User Experience. And remember that you can review the b4-final application in the downloads that accompany this book, which include all of the code as well.
Open your index.ts file for editing. You’ll need a couple of methods—the first of which is getBundles. Add this code toward the top of the file, right after fetchJSON:
| | const getBundles = async () => { |
| | const bundles = await fetchJSON('/api/list-bundles'); |
| | if (bundles.error) ... |
Read now
Unlock full access