Skip to content

Commit 207df14

Browse files
committed
docs: clarify readonly
1 parent def2a75 commit 207df14

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ npm install --save dendriform
141141
- [Rendering](#rendering)
142142
- [Rendering arrays](#rendering-arrays)
143143
- [Setting data](#setting-data)
144-
- [Readonly forms](#readonly-forms)
144+
- [Read-only forms](#readonly-forms)
145145
- [Updating from props](#updating-from-props)
146146
- [ES6 classes](#es6-classes)
147147
- [ES6 maps](#es6-maps)
@@ -580,9 +580,9 @@ form.done();
580580
// form.value will update to become 3
581581
```
582582
583-
### Readonly forms
583+
### Read-only forms
584584
585-
You may want to allow subscribers to a form, while also preventing them from making any changes. For this use case, the `readonly()` method returns a version of the form that cannot be set and cannot navigate history. Any forms branched off a readonly form will also be unable to set or navigate history.
585+
You may want to allow subscribers to a form, while also preventing them from making any changes. For this use case the `readonly()` method returns a version of the form that cannot be set and cannot navigate history. Calls to `set()`, `setParent()`, `undo()`, `redo()` and `go()` will throw an error. Any forms branched off a readonly form will also be read-only.
586586
587587
```js
588588
const form = new Dendriform(0);

packages/dendriform/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ npm install --save dendriform
141141
- [Rendering](#rendering)
142142
- [Rendering arrays](#rendering-arrays)
143143
- [Setting data](#setting-data)
144-
- [Readonly forms](#readonly-forms)
144+
- [Read-only forms](#readonly-forms)
145145
- [Updating from props](#updating-from-props)
146146
- [ES6 classes](#es6-classes)
147147
- [ES6 maps](#es6-maps)
@@ -580,9 +580,9 @@ form.done();
580580
// form.value will update to become 3
581581
```
582582
583-
### Readonly forms
583+
### Read-only forms
584584
585-
You may want to allow subscribers to a form, while also preventing them from making any changes. For this use case, the `readonly()` method returns a version of the form that cannot be set and cannot navigate history. Any forms branched off a readonly form will also be unable to set or navigate history.
585+
You may want to allow subscribers to a form, while also preventing them from making any changes. For this use case the `readonly()` method returns a version of the form that cannot be set and cannot navigate history. Calls to `set()`, `setParent()`, `undo()`, `redo()` and `go()` will throw an error. Any forms branched off a readonly form will also be read-only.
586586
587587
```js
588588
const form = new Dendriform(0);

0 commit comments

Comments
 (0)