Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. const startProximityObserver = () => {
  2. const[atLesesalen, setLoc] = useState(false);
  3. // will trigger when the user is within ~ 5 m of any beacon with tag "lobby"
  4. const zone1 = new RNEP.ProximityZone(1, "Lesesalen");
  5.  
  6. zone1.onEnterAction = context => {
  7. setLoc(true);
  8. console.log(atLesesalen)
  9. };
  10. zone1.onExitAction = context => {
  11. setLoc(false);
  12. console.log("zone1 onExit", context);
  13. };
  14. }
  15. export startProximityObserver;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement