mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
55cafb8891
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
11 lines
275 B
TypeScript
11 lines
275 B
TypeScript
import PluginService from '@joplin/lib/services/plugins/PluginService';
|
|
import { useMemo } from 'react';
|
|
|
|
const usePlugin = (pluginId: string) => {
|
|
return useMemo(() => {
|
|
return PluginService.instance().pluginById(pluginId);
|
|
}, [pluginId]);
|
|
};
|
|
|
|
export default usePlugin;
|