@cleanweb/react 1.1.1-beta.18 → 1.1.1-beta.19
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.
- package/build/classy/class.d.ts +17 -15
- package/package.json +1 -1
package/build/classy/class.d.ts
CHANGED
@@ -33,24 +33,25 @@ export declare class ClassComponent<TProps extends o = WeakEmptyObject, TState e
|
|
33
33
|
*/
|
34
34
|
Render?: VoidFunctionComponent<{}>;
|
35
35
|
/**
|
36
|
-
*
|
37
|
-
*
|
36
|
+
* Analogous to {@link React.Component.render}. A function that returns
|
37
|
+
* your component's JSX template.
|
38
38
|
*
|
39
|
-
*
|
40
|
-
*
|
41
|
-
*
|
39
|
+
* You should place most logic that would usually go here
|
40
|
+
* in {@link ComponentInstance.beforeRender | `beforeRender`} instead.
|
41
|
+
* This helps to separate concerns and keep the template itself clean.
|
42
42
|
*
|
43
|
-
*
|
44
|
-
* in order to separate concerns and keep the template itself clean.
|
43
|
+
* ******
|
45
44
|
*
|
46
|
-
*
|
47
|
-
*
|
48
|
-
*
|
49
|
-
*
|
50
|
-
* </h1>
|
51
|
-
* );
|
45
|
+
* Ideally the template method should only be concerned with defining the HTML/JSX structure of
|
46
|
+
* your component's UI. This may include destructuring nested instance members
|
47
|
+
* into more easily accessible local variables, or some simple transformation of data from props/state
|
48
|
+
* into a more appropriate format for display.
|
52
49
|
*
|
53
|
-
*
|
50
|
+
* ******
|
51
|
+
*
|
52
|
+
* @example < caption>Using a template function that returns JSX.</ caption>
|
53
|
+
*
|
54
|
+
* ```tsx
|
54
55
|
* template = () => {
|
55
56
|
* const { title } = this.props;
|
56
57
|
*
|
@@ -60,8 +61,9 @@ export declare class ClassComponent<TProps extends o = WeakEmptyObject, TState e
|
|
60
61
|
* </h1>
|
61
62
|
* );
|
62
63
|
* }
|
64
|
+
* ```
|
63
65
|
*/
|
64
|
-
template?:
|
66
|
+
template?: () => ReactTemplate;
|
65
67
|
/**
|
66
68
|
* Manually trigger a rerender of your component.
|
67
69
|
* You should rarely ever need this. But if you are migrating
|