We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have this peace of code:
const ResultSection = ({ text }) => ( <Async watch={text} promiseFn={() => search(text)}> <Async.Loading>Loading...</Async.Loading> <Async.Resolved> {(data) => (<Result data={data}/>)} </Async.Resolved> <Async.Rejected>{(error) => `Something went wrong: ${error.message}`}</Async.Rejected> </Async> );
the <Result data={data}/> component remains rendered with the old data after rerunning promiseFn() with new text producing an error, resulting in
<Result data={data}/>
promiseFn()
text
<Result data={data}/> Something went wrong: ${error.message}
I can prevent rendering the old <Result data={data}/> component using this code:
... <Async.Resolved> {(data, { error }) => {return error ? null : ( <Result data={data} /> )}} </Async.Resolved> ...
but I think this is a workaround and the old <Result data={data}/> component should disappear without this explicit check on error.
The text was updated successfully, but these errors were encountered:
Agreed, this should only happen when the persist flag is enabled. Can you provide a pull request?
persist
Sorry, something went wrong.
Fixed in 3.7.1
Thanks for reporting!
Thanks for fixing it so quickly!
No branches or pull requests
I have this peace of code:
the
<Result data={data}/>
component remains rendered with the old data after rerunningpromiseFn()
with newtext
producing an error, resulting inI can prevent rendering the old
<Result data={data}/>
component using this code:but I think this is a workaround and the old
<Result data={data}/>
component should disappear without this explicit check on error.The text was updated successfully, but these errors were encountered: