From 65ed3a2aa37f104329f76667b3a499c19374101c Mon Sep 17 00:00:00 2001 From: Mike Thompson Date: Fri, 14 Apr 2017 15:38:18 +1000 Subject: [PATCH] Improve the Table of Contents in some docs --- docs/ApplicationState.md | 1 - docs/Code-Of-Conduct.md | 8 ++++- docs/CodeWalkthrough.md | 36 +++---------------- docs/Debugging-Event-Handlers.md | 18 ++++------ docs/EventHandlingInfographic.md | 12 +++---- docs/FAQs/CatchingEventExceptions.md | 2 -- docs/FAQs/UseASubscriptionInAnEventHandler.md | 14 +++----- docs/SubscriptionInfographic.md | 2 +- docs/Talking-To-Servers.md | 19 ++++------ docs/Using-Stateful-JS-Components.md | 20 ++++------- 10 files changed, 40 insertions(+), 92 deletions(-) diff --git a/docs/ApplicationState.md b/docs/ApplicationState.md index cdcf6ce..92e80a6 100644 --- a/docs/ApplicationState.md +++ b/docs/ApplicationState.md @@ -125,5 +125,4 @@ Next: [First Code Walk-Through](CodeWalkthrough.md) - diff --git a/docs/Code-Of-Conduct.md b/docs/Code-Of-Conduct.md index c207051..9cadfa4 100644 --- a/docs/Code-Of-Conduct.md +++ b/docs/Code-Of-Conduct.md @@ -34,4 +34,10 @@ To the extent possible under law, the Day8 team has waived all copyright and rel [cocoapods]: https://github.com/CocoaPods/CocoaPods/blob/master/CODE_OF_CONDUCT.md [bundler]: http://bundler.io/conduct.html [jsconf]: http://jsconf.com/codeofconduct.html -[contributor]: http://contributor-covenant.org/ \ No newline at end of file +[contributor]: http://contributor-covenant.org/ + + + + + + diff --git a/docs/CodeWalkthrough.md b/docs/CodeWalkthrough.md index e0e9b4b..b294864 100644 --- a/docs/CodeWalkthrough.md +++ b/docs/CodeWalkthrough.md @@ -8,37 +8,6 @@ At this point, you are about 50% of the way to understanding re-frame. You have In this tutorial, **we look at re-frame code**. By the end of it, you'll be at 70% knowledge, and ready to start coding. - - - -## Table Of Contents - -- [What Code?](#what-code) -- [Namespace](#namespace) -- [Data Schema](#data-schema) -- [Events (domino 1)](#events-domino-1) - - [dispatch](#dispatch) - - [After dispatch](#after-dispatch) -- [Event Handlers (domino 2)](#event-handlers-domino-2) - - [Two ways To register](#two-ways-to-register) - - [reg-event-db](#reg-event-db) - - [:initialize](#initialize) - - [:timer](#timer) - - [:time-color-change](#time-color-change) -- [Effect Handlers (domino 3)](#effect-handlers-domino-3) -- [Subscription Handlers (domino 4)](#subscription-handlers-domino-4) - - [reg-sub](#reg-sub) -- [View Functions (domino 5)](#view-functions-domino-5) - - [Hiccup](#hiccup) - - [Subscribing](#subscribing) - - [The View Functions](#the-view-functions) - - [Components Like Templates?](#components-like-templates) -- [Kick Starting The App](#kick-starting-the-app) -- [Summary](#summary) -- [Next Steps](#next-steps) - - - ## What Code? This repo contains an `/examples` application called ["simple"](https://github.com/Day8/re-frame/tree/develop/examples/simple), @@ -518,3 +487,8 @@ Previous: [app-db (Application State)](ApplicationState.md)   &n Up: [Index](README.md)       Next: [Mental Model Omnibus](MentalModelOmnibus.md) + + + + + diff --git a/docs/Debugging-Event-Handlers.md b/docs/Debugging-Event-Handlers.md index cd5e47c..7a5dd03 100644 --- a/docs/Debugging-Event-Handlers.md +++ b/docs/Debugging-Event-Handlers.md @@ -6,18 +6,6 @@ Event handlers are quite central to a re-frame app. Only event handlers can update `app-db` to "step" an application "forward" from one state to the next. - - -## Table Of Contents - -- [The `debug` Interceptor](#the-debug-interceptor) - - [Using `debug`](#using-debug) - - [Too Much Repetition - Part 1](#too-much-repetition---part-1) -- [3. Checking DB Integrity](#3-checking-db-integrity) - - [Too Much Repetition - Part 2](#too-much-repetition---part-2) - - [What about the -fx variation?](#what-about-the--fx-variation) - - ## The `debug` Interceptor @@ -229,3 +217,9 @@ was being changed). Actually, it would probably be better to write an alternative `after` which XXX TODO: finish thought + + + + + + diff --git a/docs/EventHandlingInfographic.md b/docs/EventHandlingInfographic.md index 962f0a5..51f2db3 100644 --- a/docs/EventHandlingInfographic.md +++ b/docs/EventHandlingInfographic.md @@ -1,10 +1,3 @@ - - -## Table Of Contents - -- [Event Handling Infographics](#event-handling-infographics) - - ## Event Handling Infographics @@ -22,3 +15,8 @@ They should be reviewed in conjunction with the written tutorials. Previous: [Mental Model Omnibus](MentalModelOmnibus.md)       Up: [Index](README.md)       Next: [Effectful Handlers](EffectfulHandlers.md)       + + + + + diff --git a/docs/FAQs/CatchingEventExceptions.md b/docs/FAQs/CatchingEventExceptions.md index 3603261..2eefd10 100644 --- a/docs/FAQs/CatchingEventExceptions.md +++ b/docs/FAQs/CatchingEventExceptions.md @@ -1,5 +1,3 @@ - - ### Question How can I detect exceptions in Event Handlers? diff --git a/docs/FAQs/UseASubscriptionInAnEventHandler.md b/docs/FAQs/UseASubscriptionInAnEventHandler.md index 278d05a..2ef757b 100644 --- a/docs/FAQs/UseASubscriptionInAnEventHandler.md +++ b/docs/FAQs/UseASubscriptionInAnEventHandler.md @@ -1,13 +1,3 @@ - - -## Table Of Contents - -- [Question](#question) -- [Short Answer](#short-answer) -- [Longer Answer](#longer-answer) - - - ### Question How do I access the value of a subscription from inside an event handler? @@ -24,6 +14,10 @@ Operationally: you'll end up with a memory leak. ### Longer Answer + + + + diff --git a/docs/SubscriptionInfographic.md b/docs/SubscriptionInfographic.md index b79a02a..afe5f53 100644 --- a/docs/SubscriptionInfographic.md +++ b/docs/SubscriptionInfographic.md @@ -18,5 +18,5 @@ Next: [Correcting a wrong](SubscriptionsCleanup.md)    &nbs -## Table Of Contents + diff --git a/docs/Talking-To-Servers.md b/docs/Talking-To-Servers.md index ebf74d5..9f62526 100644 --- a/docs/Talking-To-Servers.md +++ b/docs/Talking-To-Servers.md @@ -1,16 +1,3 @@ - - -## Table Of Contents - -- [Talking To Servers](#talking-to-servers) -- [Triggering The Request](#triggering-the-request) -- [The Event Handler](#the-event-handler) - - [Version 1](#version-1) - - [Successful GET](#successful-get) - - [Problems In Paradise?](#problems-in-paradise) - - [Version 2](#version-2) - - ## Talking To Servers @@ -160,3 +147,9 @@ Notes: Previous: [Loading Initial Data](Loading-Initial-Data.md)       Up: [Index](README.md)       Next: [Subscribing to External Data](Subscribing-To-External-Data.md) + + + + + + diff --git a/docs/Using-Stateful-JS-Components.md b/docs/Using-Stateful-JS-Components.md index 58f609a..f8de1f0 100644 --- a/docs/Using-Stateful-JS-Components.md +++ b/docs/Using-Stateful-JS-Components.md @@ -13,20 +13,6 @@ thrill of that forbidden fruit. I won't tell, if you don't. But careful plans must be made ... - - -## Table Of Contents - -- [The overall plan](#the-overall-plan) -- [Example Using Google Maps](#example-using-google-maps) -- [Pattern Discovery](#pattern-discovery) -- [Code Credit](#code-credit) -- [D3 Examples](#d3-examples) -- [Advanced Lifecycle Methods](#advanced-lifecycle-methods) - - - - ### The overall plan To use a stateful js component, you'll need to write two Reagent components: @@ -107,3 +93,9 @@ https://gadfly361.github.io/gadfly-blog/2016-10-22-d3-in-reagent.html If you mess around with lifecycle methods, you'll probably want to read Martin's explanations: https://www.martinklepsch.org/posts/props-children-and-component-lifecycle-in-reagent.html + + + + + +