You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Use `ready`function to access the `instance`object
199
+
The `ready` function in the `react-dyn-tabs` library is part of the array returned by the `useDynTabs` hook, alongside the `TabList` and `PanelList` components. This function allows developers to execute a callback when the `TabList` and `PanelList` components are fully mounted, providing access to the instance object for further manipulation.
197
200
198
-
```js
199
-
ready((instance) => {
200
-
// manipulate tabs using instance object here
201
-
});
202
-
```
201
+
### Key Features
203
202
204
-
-`ready` function accepts a `callback` as its parameter and executes it as soon as Tabs get mounted.
203
+
-**Multiple Calls**: Developers can invoke the `ready` function multiple times without any issues.
204
+
-**Stable Identity**: The reference to the `ready` function remains stable across component re-renders, ensuring consistent behavior.
205
+
-**Immediate Execution**: If the `ready` function is called after the tabs have already been mounted, the provided callback will be executed immediately.
205
206
206
-
- If `ready` function is called after the Tabs has been mounted, the `callback` passed in will be executed immediately.
207
+
### Example Usage
207
208
208
-
-`ready` function can be executed multiple times and its identity is stable and won’t change on re-renders.
Copy file name to clipboardExpand all lines: package.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "react-dyn-tabs",
3
-
"version": "6.2.0",
3
+
"version": "6.2.1",
4
4
"private": false,
5
5
"description": "Create responsive and dynamic tabs in React. This library supports ARIA accessibility and provides complete control over tab management using hooks.",
0 commit comments