-
Notifications
You must be signed in to change notification settings - Fork 35
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
Training6 task2 #59
base: master
Are you sure you want to change the base?
Training6 task2 #59
Conversation
|
||
function* networkSaga() { | ||
try { | ||
yield delay(500); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thienvu23 why do we need to use delay here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to delay and put action network status here, you can set default navigator.onLine on reducer I commented above
|
||
function* networkCheckAutoSubmitting() { | ||
let taskRunSubmittingAuto; | ||
while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thienvu23
we don't put network action in the init app anymore, so you need to change code here a bit
import { syncNetworkStatus } from "../actions/network"; | ||
|
||
const initialState = { | ||
isConnected: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should get from navigator.onLine instead of set to false
Training 6 task 2 is complete