Skip to content

Commit 39c293d

Browse files
committed
v0.5.3
1 parent 93d260b commit 39c293d

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

demo/tiddlers/docs/useRenderTiddler.tid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Finally, in a child component, you can access the parent widget using the contex
3131

3232
```tsx
3333
import React, { createRef } from 'react';
34-
import { useRenderTiddler } from 'tw-react';
34+
import { useRenderTiddler } from '$:/plugins/linonetwo/tw-react/index.js';
3535

3636
export function SideBarContent(props: { title: string }): JSX.Element {
3737
const tabContentRef = createRef<HTMLDivElement>();

src/plugin.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"author": "LinOnetwo",
55
"core-version": ">=5.3.0",
66
"plugin-type": "plugin",
7-
"version": "0.5.2",
7+
"version": "0.5.3",
88
"list": "readme"
99
}

src/readme.tid

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const Widget = require('$:/plugins/linonetwo/tw-react/widget.js').widget
5252
Use the type:
5353

5454
```js
55+
import { useRenderTiddler } from '$:/plugins/linonetwo/tw-react/index.js';
5556
import type { ReactWidget } from 'tw-react';
5657

5758
const Widget = require('$:/plugins/linonetwo/tw-react/widget.js').widget as typeof ReactWidget;
@@ -88,10 +89,10 @@ getProps = () => {
8889

8990
!!! React Hooks
9091

91-
We provided some hooks for reactive data management with tw data source. You can import them from the `tw-react` package.
92+
We provided some hooks for reactive data management with tw data source. You can import them from the `$:/plugins/linonetwo/tw-react/index.js` (Instead of from `tw-react` package, because they already included in the plugin).
9293

9394
```ts
94-
import { useFilter } from 'tw-react'
95+
import { useFilter } from '$:/plugins/linonetwo/tw-react/index.js'
9596
```
9697

9798
You can't import them from plugin's file, because they are optional, so only included in the npm package, not in the plugin json bundle.

0 commit comments

Comments
 (0)