Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const startProximityObserver = () => {
- const[atLesesalen, setLoc] = useState(false);
- // will trigger when the user is within ~ 5 m of any beacon with tag "lobby"
- const zone1 = new RNEP.ProximityZone(1, "Lesesalen");
- zone1.onEnterAction = context => {
- setLoc(true);
- console.log(atLesesalen)
- };
- zone1.onExitAction = context => {
- setLoc(false);
- console.log("zone1 onExit", context);
- };
- }
- export startProximityObserver;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement