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
198
+
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 once the `TabList` and `PanelList` components are fully mounted, providing access to the instance object for further manipulation.
196
199
197
-
```js
198
-
ready((instance) => {
199
-
// manipulate tabs using instance object here
200
-
});
201
-
```
200
+
### Key Features
201
+
202
+
-**Multiple Calls**: Developers can invoke the `ready` function multiple times without any issues.
203
+
-**Stable Identity**: The reference to the `ready` function remains stable across component re-renders, ensuring consistent behavior.
204
+
-**Immediate Execution**: If the `ready` function is called after the tabs have already been mounted, the provided callback will be executed immediately.
202
205
203
-
-`ready` function accepts a `callback` as its parameter and executes it as soon as Tabs get mounted.
206
+
### Example Usage
204
207
205
-
- If `ready` function is called after the Tabs has been mounted, the `callback` passed in will be executed immediately.
0 commit comments