Skip to content

Commit ff40d9a

Browse files
committed
Update store listing and links in README
1 parent 1467b25 commit ff40d9a

File tree

1 file changed

+24
-7
lines changed

1 file changed

+24
-7
lines changed

README.md

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ Let's briefly have a look at the most important files:
1414
* `src/App.js` is the main React component and makes use of the JSON Forms Component
1515
in order to render a form.
1616

17-
The [data schema](https://github.com/edgarmueller/jsonforms-react-seed/blob/master/src/schema.json) defines
17+
The [data schema](https://github.com/eclipsesource/jsonforms-react-seed/blob/master/src/schema.json) defines
1818
the structure of a Task: it contains attributes such as title, description, due date and so on.
1919

20-
The [corresponding UI schema](https://github.com/edgarmueller/jsonforms-react-seed/blob/master/src/uischema.json)
20+
The [corresponding UI schema](https://github.com/eclipsesource/jsonforms-react-seed/blob/master/src/uischema.json)
2121
specifies controls for each property and puts them into a vertical layout that in turn contains two
2222
horizontal layouts.
2323

@@ -30,15 +30,32 @@ Please refer to TODO for how to do this.
3030
## Setting up the store
3131

3232
```js
33-
import schema from './schema.json';
34-
import uischema from './uischema.json';
33+
const store = createStore(
34+
jsonformsReducer(),
35+
{
36+
jsonforms: {
37+
common: {
38+
data,
39+
schema,
40+
uischema
41+
},
42+
renderers: JsonForms.renderers,
43+
fields: JsonForms.fields
44+
},
45+
},
46+
applyMiddleware(thunk)
47+
);
3548

36-
// TODO: update JSONForms to most recent version to support new signature
37-
const store = initJsonFormsStore({
49+
// initialize store
50+
store.dispatch({
51+
type: Actions.INIT,
3852
data,
39-
schema,
53+
schema,
4054
uischema,
4155
});
56+
57+
// trigger initial validation
58+
store.dispatch(Actions.validate());
4259
```
4360

4461
We then use the `Provider` component provided by `react-redux` to provide the store to the

0 commit comments

Comments
 (0)