From a1f1f3bb38da1b895bb9e24fac3ba4ad76c89567 Mon Sep 17 00:00:00 2001 From: rnentjes Date: Fri, 14 Oct 2022 20:09:43 +0200 Subject: [PATCH] Add some documentation --- docs/getting-started.md | 4 ++-- docs/home.md | 1 + docs/how-it-works.md | 4 ++-- docs/img/{create project.png => create-project.png} | Bin readme.md | 2 ++ 5 files changed, 7 insertions(+), 4 deletions(-) rename docs/img/{create project.png => create-project.png} (100%) diff --git a/docs/getting-started.md b/docs/getting-started.md index 09d5438..5d8f025 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -56,7 +56,7 @@ fun greet() = "world" Replace the code in the file with the following for a simple click app: -```koltin +```kotlin import kotlinx.browser.document import kotlinx.html.button import kotlinx.html.div @@ -144,4 +144,4 @@ the data changes, that would look like this: In that case you can remove the requestUpdate call from the onClickFunction. -You can find a working repository of this example here: [example]() +You can find a working repository of this example here: [kotlin-komponent-start](https://github.com/rnentjes/kotlin-komponent-start) diff --git a/docs/home.md b/docs/home.md index 075e1b8..e1d6be0 100644 --- a/docs/home.md +++ b/docs/home.md @@ -3,3 +3,4 @@ * [Home](home.md) * [Getting started](getting-started.md) * [How it works](how-it-works.md) + diff --git a/docs/how-it-works.md b/docs/how-it-works.md index 0c2cf66..81653b1 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -15,8 +15,8 @@ This way there will not be double updates of the same komponent. The render call will be invoked and every html builder function (div, span etc.) will call the different HtmlBuilder functions like onTagStart, onTagAttributeChange etc. -In these functions the HtmlBuilder will compare the dom against the call being made and it will update the DOM -if needed. +In these functions the HtmlBuilder will compare the dom against the call being made, and it will update the DOM +as needed. diff --git a/docs/img/create project.png b/docs/img/create-project.png similarity index 100% rename from docs/img/create project.png rename to docs/img/create-project.png diff --git a/readme.md b/readme.md index 1dd46e8..3de911f 100644 --- a/readme.md +++ b/readme.md @@ -9,3 +9,5 @@ See the komp-todo repository for a basic example here: [komp-todo](https://githu For a more complete example take a look at the simple-password-manager repository: [simple-password-manager](https://github.com/rnentjes/simple-password-manager) Available on maven central: "nl.astraeus:kotlin-komponent-js:1.0.0" + +Some getting started documentation can be found [here](docs/getting-started.md) \ No newline at end of file