From 8f247dd2124143af3ad43bf8cea404ee19813a99 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Thu, 21 Feb 2019 11:45:26 +0000 Subject: [PATCH] Add links to local sections in README --- README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 504b2b12..bdd75aba 100644 --- a/README.md +++ b/README.md @@ -172,8 +172,9 @@ and `Equatable`, which allows us to observe those for changes too. ### Components -`Component` is a protocol, which couples given `Props` and `Children` on screen -and provides some declaration how these are rendered on screen: +`Component` is a protocol, which couples given [`Props`](#props) and +[`Children`](#children) on screen and provides some declaration how these are +rendered on screen: ```swift protocol Component { @@ -193,9 +194,9 @@ has done, which is built on top of PATs but stays flexible and ergonomic). ### Nodes -A node is a container for `Props`, `Children` and a type conforming to -`Component` rendering this "configuration". If you're familiar with React, nodes -in Tokamak correspond to [elements in +A node is a container for [`Props`](#props), [`Children`](#children) and a type +conforming to [`Component`](#components) rendering this "configuration". If +you're familiar with React, nodes in Tokamak correspond to [elements in React](https://reactjs.org/docs/glossary.html#elements). When `Children` is an array of nodes, we can indirectly form a tree describing the app's UI. Corollary, nodes are immutable and `Equatable`. You'd only need to use the @@ -241,8 +242,9 @@ StackView.node(.init(axis: .vertical), []) ### Render function One of the most simple components is a [pure -function](https://en.wikipedia.org/wiki/Pure_function) taking `Props` and -`Children` as an argument and returning a node tree as a result: +function](https://en.wikipedia.org/wiki/Pure_function) taking [`Props`](#props) +and [`Children`](#children) as an argument and returning a node tree as a +result: ```swift protocol PureComponent: Component {