showing results for - "use recoil oitside"
Hassan
01 May 2018
1import React from 'react';
2import RecoilOutside from "recoil-outside";
3import { RecoilRoot } from "recoil";
4import Main from "./Main"
5
6const App = () => {
7	return (
8	    <RecoilRoot>
9	    	<RecoilOutside/>
10           	<Main />
11        </RecoilRoot>
12    );
13};
14
15export default App;
16
17// Other File
18import { promiseSetRecoil, promiseGetRecoil } from "recoil-outside"import { store } from "./Store"
19
20export const setTest = async() => {
21	await promiseSetRecoil(store, "Success")
22}
23export const getTest = async() => {
24	const value = await promiseGetRecoil(store)
25	return value
26}
similar questions
queries leading to this page
use recoil oitside