Skip to content

Commit 40d4324

Browse files
author
Chris Nelson
committed
bump version add readme
1 parent 991d09b commit 40d4324

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

Diff for: README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# `<live-template>`
22

3-
A `<live-template>` connects a template to a state source (currently provided by [LiveState] ). After connecting to a LiveState backend, it will:
3+
A `<live-template>` element connects a template to a state source (currently provided by [LiveState] ). After connecting to a LiveState channel, it will:
44

55
* render the initial state
6-
* subscribe to state changes and re-renders
7-
* pushes events to the state source which may then compute a new state
6+
* subscribe to state updates and re-render on changes
7+
* pushes events to a Livestate backend which may then compute a new state
88

99
## Getting started
1010

@@ -14,9 +14,9 @@ The easiest way to start is to open an html file and add a `<live-template>` ele
1414

1515
```html
1616
<script src=""></script>
17-
<live-template url="wss://live-template-example.fly.dev" topic="todos">
17+
<live-template url="wss://live-template-example.fly.dev/live_state" topic="todos">
1818
<ul>
19-
<li :each={{todo in todos}}>
19+
<li :each={{todo in todos}}>{{todo}}</li>
2020
</ul>
2121

2222
<form onsubmit={{send('add-todo')}}>
@@ -27,11 +27,11 @@ The easiest way to start is to open an html file and add a `<live-template>` ele
2727
</live-template>
2828
```
2929

30-
You should be to open this file in your browser and it will connect to the example app backend.
30+
You should be to open this file in your browser and it will connect to the example app backend. Feel free to experiment!
3131

3232
## How it works
3333

34-
<live-templates> are designed to connect to a LiveState backend. LiveState is built on the same excellent technology stack that powers LiveView: Phoenix Channels, Phoenix, Elixir, and Erlang. This allows us to host the persistent conversational state of every user connected to a LiveTemplate application in a way that scales efficiently across millions of connected users.
34+
The `<live-template>` element is designed to connect to a LiveState backend. LiveState is built on the same excellent technology stack that powers LiveView: Phoenix Channels, Phoenix, Elixir, and Erlang. This allows us to host the persistent conversational state of every user connected to a LiveTemplate application in a way that scales efficiently across millions of connected users.
3535

3636
## Installation
3737

@@ -52,7 +52,7 @@ Add a `<live-template>` element. Required attributes are:
5252

5353
## Template syntax
5454

55-
The template syntax is provided by the [templize]() library. Expressions are surrounded by `{{}}` and may contain the following:
55+
The template syntax is provided by the [templize](https://github.com/dy/templize) library. Expressions are surrounded by `{{}}`. See templize docs for all supported feature.
5656

5757
## Sending events
5858

Diff for: package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,18 @@
33
"description": "",
44
"license": "MIT",
55
"author": "live-template",
6-
"version": "0.0.0",
6+
"version": "0.0.1",
77
"type": "module",
88
"main": "index.js",
99
"module": "index.js",
10-
"exports": {
11-
".": "./index.js",
12-
"./live-template.js": "./live-template.js"
13-
},
1410
"scripts": {
1511
"analyze": "cem analyze --litelement",
1612
"start": "web-dev-server",
1713
"test": "web-test-runner --coverage",
1814
"test:watch": "web-test-runner --watch"
1915
},
2016
"dependencies": {
21-
"phx-live-state": "../phx-live-state",
17+
"phx-live-state": ">= 0.0.0",
2218
"templize": "^2.4.4"
2319
},
2420
"devDependencies": {

0 commit comments

Comments
 (0)