piral-react-15 1.9.0-beta.8186 → 1.9.0-beta.8209

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -19
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -22,18 +22,19 @@ The extension slot component to be used in React 15.x components.
22
22
 
23
23
  ## Usage
24
24
 
25
- ::: summary: For pilet authors
25
+ ::: summary: Modern Use (recommended)
26
26
 
27
- You can use the `fromReact15` function from the Pilet API to convert your React v15 components to components usable by your Piral instance.
27
+ The recommended way is to use `piral-react-15` from your pilets. In this case, no registration in the Piral instance is required.
28
28
 
29
29
  Example use:
30
30
 
31
31
  ```ts
32
32
  import { PiletApi } from '<name-of-piral-instance>';
33
+ import { fromReact15 } from 'piral-react-15/convert';
33
34
  import { React15Page } from './React15Page';
34
35
 
35
36
  export function setup(piral: PiletApi) {
36
- piral.registerPage('/sample', piral.fromReact15(React15Page));
37
+ piral.registerPage('/sample', fromReact15(React15Page));
37
38
  }
38
39
  ```
39
40
 
@@ -42,22 +43,11 @@ Within React v15 components the Piral React v15 extension component can be used
42
43
  ```jsx
43
44
  <React15Extension name="name-of-extension" />
44
45
  ```
45
-
46
- Alternatively, if `piral-react-15` has not been added to the Piral instance you can install and use the package also from a pilet directly.
47
-
48
- ```ts
49
- import { PiletApi } from '<name-of-piral-instance>';
50
- import { fromReact15 } from 'piral-react-15/convert';
51
- import { React15Page } from './React15Page';
52
-
53
- export function setup(piral: PiletApi) {
54
- piral.registerPage('/sample', fromReact15(React15Page));
55
- }
56
- ```
57
-
58
46
  :::
59
47
 
60
- ::: summary: For Piral instance developers
48
+ ::: summary: Legacy Use
49
+
50
+ For backwards compatibility, you can also install `piral-react-15` in your Piral instance.
61
51
 
62
52
  Using React v15 with Piral is as simple as installing `piral-react-15` and `react-15`. For `react-15` add the following two packages to your project's dependencies:
63
53
 
@@ -97,9 +87,8 @@ The `react-15` package (or whatever alias you've chosen) should be shared with t
97
87
  }
98
88
  }
99
89
  ```
100
-
101
90
  :::
102
91
 
103
92
  ## License
104
93
 
105
- Piral is released using the MIT license. For more information see the [license file](./LICENSE).
94
+ Piral is released using the MIT license. For more information see the [license file](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "piral-react-15",
3
- "version": "1.9.0-beta.8186",
3
+ "version": "1.9.0-beta.8209",
4
4
  "description": "Plugin for integrating React v15 components in Piral.",
5
5
  "keywords": [
6
6
  "piral",
@@ -51,9 +51,9 @@
51
51
  "test": "echo \"Error: run tests from root\" && exit 1"
52
52
  },
53
53
  "devDependencies": {
54
- "piral-core": "1.9.0-beta.8186",
54
+ "piral-core": "1.9.0-beta.8209",
55
55
  "react-15": "npm:react@15",
56
56
  "react-dom-15": "npm:react-dom@15"
57
57
  },
58
- "gitHead": "ff7d73f1903c20eb9f14e58b21f33d36dee8f572"
58
+ "gitHead": "6ae23abba61e76479bc06b76454c38957bc0e79e"
59
59
  }