Hey! really appreciate to your hard work.
I met a problem with a withJobbed component when got a new work while the component already proceeding a job
scenario is like below:
- a work promise A started =>
state: { completed: false }
- the component received new props
- new work promise B started =>
state: { completed: false }
- the old work promise A threw an error =>
state: { completed: true, error: {..} }
- an error component is mounted
- new work promise B finished =>
state: { completed: true, data: {..}, error: {..} }
- ErrorComponent will be mounted in result
maybe another scenario can be like below:
- a work promise A started =>
state: { completed: false }
- the component received new props
- new work promise B started =>
state: { completed: false }
- new work promise B finished =>
state: { completed: true, data: {..} }
- the old work promise A finished =>
state: { completed: true, data: {.. overriden} }
- a old job's data will be shown in result
I think it need to abort the old job or handle as abandoned when got a new job
Thanks in advance
Hey! really appreciate to your hard work.
I met a problem with a withJobbed component when got a new work while the component already proceeding a job
scenario is like below:
state: { completed: false }state: { completed: false }state: { completed: true, error: {..} }state: { completed: true, data: {..}, error: {..} }maybe another scenario can be like below:
state: { completed: false }state: { completed: false }state: { completed: true, data: {..} }state: { completed: true, data: {.. overriden} }I think it need to abort the old job or handle as abandoned when got a new job
Thanks in advance