mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 06:28:51 +00:00
13 lines
406 B
TypeScript
13 lines
406 B
TypeScript
import { useNuiEvent } from 'fivem-nui-react-lib';
|
|
import { useSetRecoilState } from 'recoil';
|
|
import { exampleState } from './state';
|
|
import { useExample } from './useExample';
|
|
|
|
export const useExampleService = () => {
|
|
const setExample = useSetRecoilState(exampleState.example);
|
|
useNuiEvent('EXAMPLE', 'setExample', setExample);
|
|
return useExample();
|
|
};
|
|
|
|
// call this function in the Phone.tsx file.
|