mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
feat(example-app): example app for nui
This commit is contained in:
1 parent
27a0ee72b4
commit
260cda6275
4 files changed
+38
-6
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||
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.
|
||||
Reference in new issue
Block a user