Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collection(...).get()대신에 collection(...).onSnapshot써줘 #81

Open
atn832 opened this issue Feb 13, 2021 · 1 comment
Open

collection(...).get()대신에 collection(...).onSnapshot써줘 #81

atn832 opened this issue Feb 13, 2021 · 1 comment
Assignees

Comments

@atn832
Copy link
Collaborator

atn832 commented Feb 13, 2021

.get() 쓰면 collection내용이 바뀌면 렌더 또 안 해. onSnapshot쓰면 바뀔때 마다 렌더 할거야.

document도 이렇게 처리 해줘.

https://firebase.google.com/docs/reference/js/firebase.firestore.CollectionReference#onsnapshot

@atn832
Copy link
Collaborator Author

atn832 commented Mar 19, 2021

이거 처리 하면 window.location.reload(); 다 없앨수 있어.

https://github.com/jiji14/dailyfield/search?q=window.location.reload%28%29%3B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants