Skip to content

Commit 9d95e88

Browse files
committed
fix life-cycle-hooks section headings
1 parent 4e37400 commit 9d95e88

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

docs/source/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
html_theme_options = {
105105
"github_url": "https://github.com/idom-team/idom",
106106
"use_edit_page_button": True,
107+
"show_toc_level": 2,
107108
}
108109

109110
html_context = {

docs/source/content/user-guide/life-cycle-hooks.rst

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
================
12
Life Cycle Hooks
23
================
34

45
Hooks are functions that allow you to "hook into" the life cycle events and state of
5-
Elements. Their usage should always follow the :ref:`**Rules of Hooks**`. For most use
6-
cases the :ref:`**Basic Hooks**` should be enough, however the remaining
7-
:ref:`**Supplementary Hooks**` should fulfill less common scenarios.
6+
Elements. Their usage should always follow the :ref:`Rules of Hooks`. For most use
7+
cases the :ref:`Basic Hooks` should be enough, however the remaining
8+
:ref:`Supplementary Hooks` should fulfill less common scenarios.
89

910
.. note::
1011

@@ -14,11 +15,11 @@ cases the :ref:`**Basic Hooks**` should be enough, however the remaining
1415

1516
.. contents::
1617
:local:
17-
:depth: 1
18+
:depth: 2
1819

1920

20-
**Basic Hooks**
21-
---------------
21+
Basic Hooks
22+
===========
2223

2324
Common hooks that should fulfill a majority of use cases.
2425

@@ -186,11 +187,11 @@ There are **three important subtleties** to note about using asynchronous effect
186187
and before the next effect following a subsequent update.
187188

188189

189-
**Supplementary Hooks**
190-
-----------------------
190+
Supplementary Hooks
191+
===================
191192

192193
Hooks that fulfill some less common, but still important use cases using variations of
193-
the :ref:`**Basic Hooks**`.
194+
the :ref:`Basic Hooks`.
194195

195196

196197
use_reducer
@@ -298,8 +299,8 @@ hook alongside :ref:`use_effect` or in response to element event handlers.
298299
:ref:`The Game Snake` provides a good use case for ``use_ref``.
299300

300301

301-
**Rules of Hooks**
302-
------------------
302+
Rules of Hooks
303+
==============
303304

304305
Hooks are just normal Python functions, but there's a bit of magic to them, and in order
305306
for that magic to work you've got to follow two rules. Thankfully we supply a

0 commit comments

Comments
 (0)