1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/packages/app-mobile/plugins/hooks/usePlugin.ts

11 lines
275 B
TypeScript
Raw Normal View History

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;