Guest User

Untitled

a guest
Jan 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. function Example() {
  2. // Crap, we just made a Firebase query for each render instead of
  3. // what we wanted, a query set up on mount, and cleaned up on unmount
  4. const query = useQuery(db.collections('lots-of-stuff').limit(10000));
  5. return <ul>query.docs.map(x => (<li>{x}</li>));
  6. }
Add Comment
Please, Sign In to add comment