Merge pull request #263 from Day8/toc
Add generated table of contents to docs
This commit is contained in:
commit
575051e7a7
|
@ -12,7 +12,6 @@ the [ClojureScript mailing list](https://groups.google.com/forum/#!forum/clojure
|
|||
|
||||
**Create pull requests to the develop branch**, work will be merged onto master when it is ready to be released.
|
||||
|
||||
|
||||
## Running tests
|
||||
|
||||
#### Via Browser/HTML
|
||||
|
@ -60,3 +59,9 @@ If possible provide:
|
|||
* Docstrings for functions
|
||||
* Documentation examples
|
||||
* Add the change to the Unreleased section of [CHANGES.md](CHANGES.md)
|
||||
|
||||
## Pull requests for docs
|
||||
|
||||
* Make your documentation changes
|
||||
* (Optional) Install doctoc with `npm install -g doctoc`
|
||||
* (Optional) Regenerate the docs TOC with `bin/doctoc.sh` or `bin/doctoc.bat` depending on your OS
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
:: Table of contents are generated by doctoc.
|
||||
:: Install doctoc with `npm install -g doctoc`
|
||||
:: Then run this script to regenerate the TOC after
|
||||
:: editing the docs.
|
||||
|
||||
doctoc ./docs/ --github --title '## Table Of Contents'
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
# Table of contents are generated by doctoc.
|
||||
# Install doctoc with `npm install -g doctoc`
|
||||
# Then run this script to regenerate the TOC after
|
||||
# editing the docs.
|
||||
|
||||
doctoc $(dirname $0)/../docs --github --title '## Table Of Contents'
|
|
@ -1,3 +1,13 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Simpler Apps](#simpler-apps)
|
||||
- [There's A Small Gotcha](#theres-a-small-gotcha)
|
||||
- [Larger Apps](#larger-apps)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Simpler Apps
|
||||
|
||||
To build a re-frame app, you:
|
||||
|
@ -58,7 +68,8 @@ src
|
|||
|
||||
Continue to [Navigation](Navigation.md) to learn how to switch between panels of a larger app.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [CoEffects](coeffects.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Navigation](Navigation.md)
|
||||
|
|
|
@ -4,24 +4,26 @@ This tutorial explains `coeffects`.
|
|||
|
||||
It explains what they are, how they can be "injected", and how
|
||||
to manage them in tests.
|
||||
|
||||
## Table Of Contexts
|
||||
|
||||
* [What Are They?](#what-are-they-)
|
||||
* [An Example](#an-example)
|
||||
* [How We Want It](#how-we-want-it)
|
||||
* [Abracadabra](#abracadabra)
|
||||
* [Which Interceptors?](#which-interceptors-)
|
||||
* [`inject-cofx`](#-inject-cofx-)
|
||||
* [More `inject-cofx`](#more--inject-cofx-)
|
||||
* [Meet `reg-cofx`](#meet--reg-cofx-)
|
||||
* [Example Of `reg-cofx`](#example-of--reg-cofx-)
|
||||
* [Another Example Of `reg-cofx`](#another-example-of--reg-cofx-)
|
||||
* [Secret Interceptors](#secret-interceptors)
|
||||
* [Testing](#testing)
|
||||
* [The 5 Point Summary](#the-5-point-summary)
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
## Coeffects
|
||||
- [What Are They?](#what-are-they)
|
||||
- [An Example](#an-example)
|
||||
- [How We Want It](#how-we-want-it)
|
||||
- [Abracadabra](#abracadabra)
|
||||
- [Which Interceptors?](#which-interceptors)
|
||||
- [`inject-cofx`](#inject-cofx)
|
||||
- [More `inject-cofx`](#more-inject-cofx)
|
||||
- [Meet `reg-cofx`](#meet-reg-cofx)
|
||||
- [Example Of `reg-cofx`](#example-of-reg-cofx)
|
||||
- [Another Example Of `reg-cofx`](#another-example-of-reg-cofx)
|
||||
- [Secret Interceptors](#secret-interceptors)
|
||||
- [Testing](#testing)
|
||||
- [The 5 Point Summary](#the-5-point-summary)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### What Are They?
|
||||
|
||||
|
@ -267,7 +269,8 @@ In note form:
|
|||
5. We must have previously registered a cofx handler via `reg-cofx`
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Effects](Effects.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Basic App Structure](Basic-App-Structure.md)
|
||||
|
|
|
@ -6,6 +6,19 @@ 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.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## 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)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## The `debug` Interceptor
|
||||
|
||||
You might wonder: is my event handler making the right changes to `app-db`?
|
||||
|
|
|
@ -4,6 +4,25 @@ This page describes a technique for
|
|||
debugging re-frame apps. It proposes a particular combination
|
||||
of tools. By the end, you'll be better at dominos.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Know The Beast!](#know-the-beast)
|
||||
- [re-frame's Step 3](#re-frames-step-3)
|
||||
- [Observe The Beast](#observe-the-beast)
|
||||
- [How To Trace?](#how-to-trace)
|
||||
- [Your browser](#your-browser)
|
||||
- [Your Project](#your-project)
|
||||
- [Say No To Anonymous](#say-no-to-anonymous)
|
||||
- [IMPORTANT](#important)
|
||||
- [The result](#the-result)
|
||||
- [Warning](#warning)
|
||||
- [React Native](#react-native)
|
||||
- [Appendix A - Prior to V0.8.0](#appendix-a---prior-to-v080)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Know The Beast!
|
||||
|
||||
re-frame apps are **event driven**.
|
||||
|
|
|
@ -3,27 +3,30 @@
|
|||
This tutorial shows you how to implement pure event handlers that side-effect.
|
||||
Yes, a surprising claim.
|
||||
|
||||
## Table Of Contents
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
* [Events Happen](#events-happen)
|
||||
* [Handling The Happening](#handling-the-happening)
|
||||
* [Your Handling](#your-handling)
|
||||
* [90% Solution](#90--solution)
|
||||
* [Bad, Why?](#bad--why-)
|
||||
* [The 2nd Kind Of Problem](#the-2nd-kind-of-problem)
|
||||
* [Effects And Coeffects](#effects-and-coeffects)
|
||||
* [Why Does This Happen?](#why-does-this-happen-)
|
||||
* [Doing vs Causing](#doing-vs-causing)
|
||||
* [Et tu, React?](#et-tu--react-)
|
||||
* [Pattern Structure](#pattern-structure)
|
||||
* [Effects: The Two Step Plan](#effects--the-two-step-plan)
|
||||
* [Step 1 Of Plan](#step-1-of-plan)
|
||||
* [Another Example](#another-example)
|
||||
* [The Coeffects](#the-coeffects)
|
||||
* [Variations On A Theme](#variations-on-a-theme)
|
||||
* [Summary](#summary)
|
||||
- [Events Happen](#events-happen)
|
||||
- [Handling The Happening](#handling-the-happening)
|
||||
- [Your Handling](#your-handling)
|
||||
- [90% Solution](#90%25-solution)
|
||||
- [Bad, Why?](#bad-why)
|
||||
- [The 2nd Kind Of Problem](#the-2nd-kind-of-problem)
|
||||
- [Effects And Coeffects](#effects-and-coeffects)
|
||||
- [Why Does This Happen?](#why-does-this-happen)
|
||||
- [Doing vs Causing](#doing-vs-causing)
|
||||
- [Et tu, React?](#et-tu-react)
|
||||
- [Pattern Structure](#pattern-structure)
|
||||
- [Effects: The Two Step Plan](#effects-the-two-step-plan)
|
||||
- [Step 1 Of Plan](#step-1-of-plan)
|
||||
- [Another Example](#another-example)
|
||||
- [The Coeffects](#the-coeffects)
|
||||
- [Variations On A Theme](#variations-on-a-theme)
|
||||
- [Summary](#summary)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Effects
|
||||
### Events Happen
|
||||
|
||||
Events "happen" when they are dispatched.
|
||||
|
@ -392,7 +395,8 @@ In the next tutorial, we'll shine a light on `interceptors` which are
|
|||
the mechanism by which event handlers are executed. That knowledge will give us a springboard
|
||||
to then, as a next step, better understand coeffects and effects. We'll soon be writing our own.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Up: [Index](README.md)
|
||||
Next: [Interceptors](Interceptors.md)
|
||||
|
||||
|
|
|
@ -10,24 +10,30 @@ make side effects a noop in event replays.
|
|||
> -- @stuarthalloway
|
||||
|
||||
|
||||
## Table Of Contexts
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
* [Where Effects Come From](#where-effects-come-from)
|
||||
* [The Effects Map](#the-effects-map)
|
||||
* [Infinite Effects](#infinite-effects)
|
||||
* [Extensible Side Effects](#extensible-side-effects)
|
||||
* [Writing An Effect Handler](#writing-an-effect-handler)
|
||||
* [:db Not Always Needed](#-db-not-always-needed)
|
||||
* [What Makes This Work?](#what-makes-this-work-)
|
||||
* [Order Of Effects?](#order-of-effects-)
|
||||
* [Effects With No Data](#effects-with-no-data)
|
||||
* [Testing And Noops](#testing-and-noops)
|
||||
* [Builtin Effect Handlers](#builtin-effect-handlers)
|
||||
+ [:dispatch-later](#dispatch-later)
|
||||
+ [:dispatch](#dispatch)
|
||||
+ [:dispatch-n](#dispatch-n)
|
||||
+ [:deregister-event-handler](#deregister-event-handler)
|
||||
+ [:db](#db)
|
||||
- [Where Effects Come From](#where-effects-come-from)
|
||||
- [The Effects Map](#the-effects-map)
|
||||
- [Infinite Effects](#infinite-effects)
|
||||
- [Extensible Side Effects](#extensible-side-effects)
|
||||
- [Writing An Effect Handler](#writing-an-effect-handler)
|
||||
- [:db Not Always Needed](#db-not-always-needed)
|
||||
- [What Makes This Work?](#what-makes-this-work)
|
||||
- [Order Of Effects?](#order-of-effects)
|
||||
- [Effects With No Data](#effects-with-no-data)
|
||||
- [Testing And Noops](#testing-and-noops)
|
||||
- [Summary](#summary)
|
||||
- [Builtin Effect Handlers](#builtin-effect-handlers)
|
||||
- [:dispatch-later](#dispatch-later)
|
||||
- [:dispatch](#dispatch)
|
||||
- [:dispatch-n](#dispatch-n)
|
||||
- [:deregister-event-handler](#deregister-event-handler)
|
||||
- [:db](#db)
|
||||
- [External Effects](#external-effects)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### Where Effects Come From
|
||||
|
||||
|
@ -283,13 +289,6 @@ registered handlers) to which you can return.
|
|||
XXX
|
||||
|
||||
|
||||
---
|
||||
Previous: [Interceptors](Interceptors.md)
|
||||
Up: [Index](Readme.md)
|
||||
Next: [Coeffects](Coeffects.md)
|
||||
|
||||
---
|
||||
|
||||
### Builtin Effect Handlers
|
||||
|
||||
#### :dispatch-later
|
||||
|
@ -359,7 +358,8 @@ Create a PR to include yours in this list.
|
|||
|
||||
XXX maybe put this list into the Wiki, so editable by all.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Interceptors](Interceptors.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Coeffects](Coeffects.md)
|
||||
|
|
|
@ -2,6 +2,16 @@
|
|||
|
||||
Templates, examples, and other resources related to re-frame. For additions or modifications, please create an issue with a link and description or submit a pull request.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Templates](#templates)
|
||||
- [Examples and Applications Using re-frame](#examples-and-applications-using-re-frame)
|
||||
- [Videos](#videos)
|
||||
- [Server Side Rendering](#server-side-rendering)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### Templates
|
||||
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Question](#question)
|
||||
- [Short Answer](#short-answer)
|
||||
- [Better Answer](#better-answer)
|
||||
- [Other Inspection Tools](#other-inspection-tools)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
### Question
|
||||
|
||||
|
@ -61,5 +72,6 @@ There's also [Data Frisk](https://github.com/Odinodin/data-frisk-reagent) which
|
|||
provides a very nice solution for navigating and inspecting any data structure.
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Up: [FAQ Index](README.md)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Question](#question)
|
||||
- [Answer](#answer)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### Question
|
||||
|
||||
I use logging method X, how can I make re-frame use my method?
|
||||
|
@ -23,5 +32,6 @@ override that by providing your own set or subset of these functions using
|
|||
...})
|
||||
```
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Up: [FAQ Index](README.md)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Question](#question)
|
||||
- [Answer](#answer)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### Question
|
||||
|
||||
If I `dispatch` a js event object (from a view), it is nullified
|
||||
|
@ -17,5 +26,6 @@ So there's two things to say about this:
|
|||
and debugging will become easier.
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Up: [FAQ Index](README.md)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Frequently Asked Questions](#frequently-asked-questions)
|
||||
- [Want To Add An FAQ?](#want-to-add-an-faq)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
1. [How can I Inspect app-db?](Inspecting-app-db.md)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Question](#question)
|
||||
- [Answer](#answer)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
### Question
|
||||
|
||||
Why is re-frame implemented in `.cljc` files? Aren't ClojureScript
|
||||
|
@ -16,5 +25,6 @@ Necessary interop for each platform can be found in
|
|||
See also: https://github.com/Day8/re-frame-test
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Up: [FAQ Index](README.md)
|
||||
|
|
|
@ -1,27 +1,34 @@
|
|||
## re-frame Interceptors
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Introduction](#introduction)
|
||||
- [Interceptors](#interceptors)
|
||||
- [Why Interceptors?](#why-interceptors)
|
||||
- [What Do Interceptors Do?](#what-do-interceptors-do)
|
||||
- [Wait, I know That Pattern!](#wait-i-know-that-pattern)
|
||||
- [What's In The Pipeline?](#whats-in-the-pipeline)
|
||||
- [Show Me](#show-me)
|
||||
- [Handlers Are Interceptors Too](#handlers-are-interceptors-too)
|
||||
- [Executing A Chain](#executing-a-chain)
|
||||
- [The Links Of The Chain](#the-links-of-the-chain)
|
||||
- [What Is Context?](#what-is-context)
|
||||
- [Self Modifying](#self-modifying)
|
||||
- [Credit](#credit)
|
||||
- [Write An Interceptor](#write-an-interceptor)
|
||||
- [Wrapping Handlers](#wrapping-handlers)
|
||||
- [Summary](#summary)
|
||||
- [Appendix](#appendix)
|
||||
- [The Builtin Interceptors](#the-builtin-interceptors)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Introduction
|
||||
|
||||
This is a tutorial on re-frame Interceptors.
|
||||
|
||||
## Table Of Contents
|
||||
|
||||
- [Interceptors](#interceptors)
|
||||
* [Why Interceptors?](#why-interceptors-)
|
||||
* [What Do Interceptors Do?](#what-do-interceptors-do-)
|
||||
* [Wait, I know That Pattern!](#wait--i-know-that-pattern-)
|
||||
* [What's In The Pipeline?](#what-s-in-the-pipeline-)
|
||||
* [Show Me](#show-me)
|
||||
* [Handlers Are Interceptors Too](#handlers-are-interceptors-too)
|
||||
- [Executing A Chain](#executing-a-chain)
|
||||
* [The Links Of The Chain](#the-links-of-the-chain)
|
||||
* [What Is Context?](#what-is-context-)
|
||||
* [Self Modifying](#self-modifying)
|
||||
* [Credit](#credit)
|
||||
* [Write An Interceptor](#write-an-interceptor)
|
||||
* [Wrapping Handlers](#wrapping-handlers)
|
||||
- [Summary](#summary)
|
||||
- [Appendix](#appendix)
|
||||
* [The Builtin Interceptors](#the-builtin-interceptors)
|
||||
|
||||
## Interceptors
|
||||
### Why Interceptors?
|
||||
|
||||
|
@ -382,7 +389,8 @@ To use them, first require them:
|
|||
[re-frame.core :refer [debug path]])
|
||||
```
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Effectful Handlers](EffectfulHandlers.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Effects](Effects.md)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Bootstrapping Application State](#bootstrapping-application-state)
|
||||
- [1. Register Handlers](#1-register-handlers)
|
||||
- [2. Kick Start Reagent](#2-kick-start-reagent)
|
||||
- [3. Loading Initial Data](#3-loading-initial-data)
|
||||
- [Getting Data Into `app-db`](#getting-data-into-app-db)
|
||||
- [The Pattern](#the-pattern)
|
||||
- [Scales Up](#scales-up)
|
||||
- [Cheating - Synchronous Dispatch](#cheating---synchronous-dispatch)
|
||||
- [Loading Initial Data From Services](#loading-initial-data-from-services)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Bootstrapping Application State
|
||||
|
||||
To bootstrap a re-frame application, you need to:
|
||||
|
@ -218,7 +234,8 @@ The next Tutorial will show you how.
|
|||
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Namespaced Keywords](Namespaced-Keywords.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Talking To Servers](Talking-To-Servers.md)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Namespaced Ids](#namespaced-ids)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Namespaced Ids
|
||||
|
||||
As an app gets bigger, you'll tend to get clashes on ids - event-ids, or query-ids (subscriptions), etc.
|
||||
|
@ -20,7 +28,8 @@ fiction. I can have the keyword `:panel1/edit` even though
|
|||
Naturally, you'll take advantage of this by using keyword namespaces
|
||||
which are both unique and descriptive.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Navigation](Navigation.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Loading Initial Data](Loading-Initial-Data.md)
|
||||
Next: [Loading Initial Data](Loading-Initial-Data.md)
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [What About Navigation?](#what-about-navigation)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
## What About Navigation?
|
||||
|
||||
|
@ -49,7 +57,8 @@ A high level reagent view has a subscription to :active-panel and will switch to
|
|||
|
||||
Continue to [Namespaced Keywords](Namespaced-Keywords.md) to reduce clashes on ids.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Basic App Structure](Basic-App-Structure.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Namespaced Keywords](Namespaced-Keywords.md)
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
## Eek! Performance Problems
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [1. Is It The `debug` Interceptor?](#1-is-it-the-debug-interceptor)
|
||||
- [2. `=` On Big Structures](#2--on-big-structures)
|
||||
- [An Example Of Problem 2](#an-example-of-problem-2)
|
||||
- [Solutions To Problem 2](#solutions-to-problem-2)
|
||||
- [3. Are you Using a React `key`?](#3-are-you-using-a-react-key)
|
||||
- [4. Callback Functions](#4-callback-functions)
|
||||
- [A Weapon](#a-weapon)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## 1. Is It The `debug` Interceptor?
|
||||
|
||||
This first one is something of a non-problem.
|
||||
|
|
|
@ -36,3 +36,11 @@
|
|||
- [Solve the CPU hog problem](Solve-the-CPU-hog-problem.md)
|
||||
- [Using Stateful JS Components](Using-Stateful-JS-Components.md)
|
||||
- [The re-frame Logo](The-re-frame-logo.md)
|
||||
|
||||
<!-- DOCTOC SKIP
|
||||
|
||||
We put these inside a comment so that they are hidden when rendered on Github.
|
||||
<!-- START doctoc -->
|
||||
<!-- END doctoc -->
|
||||
|
||||
-->
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Solving The CPU Hog Problem](#solving-the-cpu-hog-problem)
|
||||
- [The re-frame Solution](#the-re-frame-solution)
|
||||
- [A Sketch](#a-sketch)
|
||||
- [Why Does A Redispatch Work?](#why-does-a-redispatch-work)
|
||||
- [Variations](#variations)
|
||||
- [Cancel Button](#cancel-button)
|
||||
- [Further Notes](#further-notes)
|
||||
- [Forcing A One Off Render](#forcing-a-one-off-render)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Solving The CPU Hog Problem
|
||||
|
||||
Sometimes a handler has a lot of CPU intensive work to do, and
|
||||
|
|
|
@ -1,3 +1,23 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Subscribing to External Data](#subscribing-to-external-data)
|
||||
- [There Can Be Only One!!](#there-can-be-only-one)
|
||||
- [Components Don't Know, Don't Care](#components-dont-know-dont-care)
|
||||
- [A 2nd Source](#a-2nd-source)
|
||||
- [Via A Subscription](#via-a-subscription)
|
||||
- [The Subscription Handler's Job](#the-subscription-handlers-job)
|
||||
- [Some Code](#some-code)
|
||||
- [Any Good?](#any-good)
|
||||
- [Warning: Undo/Redo](#warning-undoredo)
|
||||
- [Query De-duplication](#query-de-duplication)
|
||||
- [Thanks To](#thanks-to)
|
||||
- [The Alternative Approach](#the-alternative--approach)
|
||||
- [What Not To Do](#what-not-to-do)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Subscribing to External Data
|
||||
|
||||
In [Talking To Servers](Talking-To-Servers.md) we learned how to
|
||||
|
@ -236,6 +256,7 @@ data into HTML and nothing more. they absolutely do not do imperative stuff.
|
|||
|
||||
Use one of the two alternatives described above.
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Talking to Servers](Talking-To-Servers.md)
|
||||
Up: [Index](README.md)
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## 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)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Talking To Servers
|
||||
|
||||
This page describes how a re-frame app might "talk" to a backend HTTP server.
|
||||
|
@ -141,7 +155,8 @@ Notes:
|
|||
|
||||
|
||||
|
||||
---
|
||||
***
|
||||
|
||||
Previous: [Loading Initial Data](Loading-Initial-Data.md)
|
||||
Up: [Index](README.md)
|
||||
Next: [Subscribing to External Data](Subscribing-To-External-Data.md)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Testing](#testing)
|
||||
- [Event Handlers - Part 1](#event-handlers---part-1)
|
||||
- [Event Handlers - Part 2](#event-handlers---part-2)
|
||||
- [Subscription Handlers](#subscription-handlers)
|
||||
- [Components- Part 1](#components--part-1)
|
||||
- [Components - Part 2A](#components---part-2a)
|
||||
- [Components - Part 2B](#components---part-2b)
|
||||
- [Components - Part 2C](#components---part-2c)
|
||||
- [Summary](#summary)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
> IGNORE THIS DOCUMENT. IT IS WIP
|
||||
|
||||
## Testing
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [The re-frame Logo](#the-re-frame-logo)
|
||||
- [Who](#who)
|
||||
- [Genesis Theories](#genesis-theories)
|
||||
- [Assets Where?](#assets-where)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## The re-frame Logo
|
||||
|
||||
![logo](/images/logo/re-frame_256w.png?raw=true)
|
||||
|
|
|
@ -13,6 +13,19 @@ thrill of that forbidden fruit.
|
|||
|
||||
I won't tell, if you don't. But careful plans must be made ...
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## 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)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
### The overall plan
|
||||
|
||||
|
|
|
@ -3,6 +3,17 @@
|
|||
Before understanding code, we must understand how re-frame manages
|
||||
application state.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [On Data](#on-data)
|
||||
- [The Big Ratom](#the-big-ratom)
|
||||
- [The Benefits Of Data-In-The-One-Place](#the-benefits-of-data-in-the-one-place)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
### On Data
|
||||
|
||||
<blockquote class="twitter-tweet" lang="en"><p>Well-formed Data at rest is as close to perfection in programming as it gets. All the crap that had to happen to put it there however...</p>— Fogus (@fogus) <a href="https://twitter.com/fogus/status/454582953067438080">April 11, 2014</a></blockquote>
|
||||
|
|
|
@ -1,3 +1,26 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Initial Code Walk-through](#initial-code-walk-through)
|
||||
- [What Code?](#what-code)
|
||||
- [What Does It Do?](#what-does-it-do)
|
||||
- [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)
|
||||
- [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)
|
||||
- [View Functions (domino 5)](#view-functions-domino-5)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Initial Code Walk-through
|
||||
|
||||
At this point in your reading, you are armed with:
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Mental Model Omnibus](#mental-model-omnibus)
|
||||
- [What is the problem?](#what-is-the-problem)
|
||||
- [Guiding Philosophy](#guiding-philosophy)
|
||||
- [It Does Physics](#it-does-physics)
|
||||
- [It does Event Sourcing](#it-does-event-sourcing)
|
||||
- [It does a reduce](#it-does-a-reduce)
|
||||
- [It does FSM](#it-does-fsm)
|
||||
- [Data Oriented Design](#data-oriented-design)
|
||||
- [Derived Data](#derived-data)
|
||||
- [Prefer Dumb Views - Part 1](#prefer-dumb-views---part-1)
|
||||
- [Prefer Dumb Views - Part 2](#prefer-dumb-views---part-2)
|
||||
- [Full Stack](#full-stack)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
## Mental Model Omnibus
|
||||
|
||||
> If a factory is torn down but the rationality which produced it is
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Derived Values, Flowing](#derived-values-flowing)
|
||||
- [Why Should You Care?](#why-should-you-care)
|
||||
- [re-frame](#re-frame)
|
||||
- [It Is A Loop](#it-is-a-loop)
|
||||
- [It Has 5 Dominoes](#it-has-5-dominoes)
|
||||
- [A Dominoes Walk Through](#a-dominoes-walk-through)
|
||||
- [A Simple Loop Of Simple Functions](#a-simple-loop-of-simple-functions)
|
||||
- [It Leverages Data](#it-leverages-data)
|
||||
- [It is both mature and successful in the large](#it-is-both-mature-and-successful-in-the-large)
|
||||
- [Where Do I Go Next?](#where-do-i-go-next)
|
||||
- [Licence](#licence)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
[logo](/images/logo/re-frame_128w.png?raw=true)
|
||||
|
||||
## Derived Values, Flowing
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
## Table Of Contents
|
||||
|
||||
- [Implements Reactive Data Flows](#implements-reactive-data-flows)
|
||||
- [Flow](#flow)
|
||||
- [Reactive Programming](#reactive-programming)
|
||||
- [How Flow Happens In Reagent](#how-flow-happens-in-reagent)
|
||||
- [Components](#components)
|
||||
- [Truth Interlude](#truth-interlude)
|
||||
- [React etc.](#react-etc)
|
||||
- [Subscribe](#subscribe)
|
||||
- [Just A Read-Only Cursor?](#just-a-read-only-cursor)
|
||||
- [The Signal Graph](#the-signal-graph)
|
||||
- [A More Efficient Signal Graph](#a-more-efficient-signal-graph)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue