Skip to content

Commit 697ce1e

Browse files
committed
template
bug fix for each
1 parent b66767b commit 697ce1e

File tree

5 files changed

+204
-200
lines changed

5 files changed

+204
-200
lines changed

docs/lifecycle.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
| **beforeFirstRender** | Before component rendered to the DOM at the first time |
99
| **afterFirstRender** | After component rendered to the DOM at the first time |
1010
|||
11+
| **beforeRender** | Before every render |
12+
| **afterRender** | After every render |
13+
|||
1114
| **beforeRerender** | Before component rerendered/updated on the DOM |
1215
| **afterRerender** | After component rerendered/updated on the DOM |
1316
|||
@@ -16,6 +19,8 @@
1619
|||
1720
| **disconnected** | Triggered when the component is removed from the DOM |
1821

22+
!> DOM and state variables is not available in "construct". You can only reach them in "render" events, especially if you are using routers.
23+
1924
## Usage Example
2025

2126
<repl-component id="sp34gk6ealoxiwu" donwload="true"></repl-component>

examples/app-router/web-app.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<html>
2-
2+
web app {state.name}
33
<a-router style="display: block;">
44
<a-outlet></a-outlet>
55
<a-route path="/" element="home-page"></a-route>

0 commit comments

Comments
 (0)