Skip to content

Commit a74c495

Browse files
committed
build: remove example app as it uses unmaintained CRA
1 parent 9a52df8 commit a74c495

File tree

13 files changed

+1807
-19295
lines changed

13 files changed

+1807
-19295
lines changed

README.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
55
[![NPM](https://img.shields.io/npm/v/react-from-json.svg)](https://www.npmjs.com/package/react-from-json) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
66

7-
[Example](http://measuredco.github.io/react-from-json/)
8-
97
## Intro
108

119
`react-from-json` lets you render React
@@ -52,10 +50,10 @@ const entry = {
5250
children: {
5351
type: "Bar",
5452
props: {
55-
baz: "Hello, world"
56-
}
57-
}
58-
}
53+
baz: "Hello, world",
54+
},
55+
},
56+
},
5957
};
6058

6159
const mapping = {
@@ -64,7 +62,7 @@ const mapping = {
6462
<div>{children}</div>
6563
</div>
6664
),
67-
Bar: ({ baz }) => <span>{baz}</span>
65+
Bar: ({ baz }) => <span>{baz}</span>,
6866
};
6967

7068
const Example = () => {
@@ -94,17 +92,17 @@ const entryWithDifferentShape = {
9492
_type: "Foo",
9593
children: {
9694
_type: "Bar",
97-
baz: "Hello, world"
98-
}
95+
baz: "Hello, world",
96+
},
9997
};
10098

101-
const mapProp = prop => {
99+
const mapProp = (prop) => {
102100
if (prop._type) {
103101
const { _type, ...props } = prop;
104102

105103
return {
106104
type: _type,
107-
props
105+
props,
108106
};
109107
}
110108

@@ -169,10 +167,10 @@ const entry = {
169167
type: "ComponentLookup",
170168
props: {
171169
componentIndex: 0,
172-
componentType: "Bar"
173-
}
174-
}
175-
}
170+
componentType: "Bar",
171+
},
172+
},
173+
},
176174
};
177175

178176
const mapping = {
@@ -181,18 +179,18 @@ const mapping = {
181179
<div>{baz}</div>
182180
</div>
183181
),
184-
Bar: ({ baz }) => <span>{baz}</span>
182+
Bar: ({ baz }) => <span>{baz}</span>,
185183
};
186184

187185
const components = {
188186
Bar: [
189187
{
190188
type: "Bar",
191189
props: {
192-
baz: "Hello, world"
193-
}
194-
}
195-
]
190+
baz: "Hello, world",
191+
},
192+
},
193+
],
196194
};
197195

198196
const Example = () => {
@@ -231,11 +229,7 @@ class FooReactFromJSON extends ReactFromJSON<Mapping, Components> {
231229

232230
const Example = () => {
233231
return (
234-
<FooReactFromJSON
235-
entry={entry}
236-
mapping={mapping}
237-
components={components}
238-
/>
232+
<FooReactFromJSON entry={entry} mapping={mapping} components={components} />
239233
);
240234
};
241235
```

example/README.md

Lines changed: 0 additions & 2164 deletions
This file was deleted.

example/package.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

example/public/index.html

Lines changed: 0 additions & 20 deletions
This file was deleted.

example/public/manifest.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

example/src/App.js

Lines changed: 0 additions & 61 deletions
This file was deleted.

example/src/index.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

example/src/index.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)