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

Chapter 4 / cancelling-requests-and-resetting-state is not working as it should #8

Open
harshshah07 opened this issue Oct 8, 2022 · 1 comment

Comments

@harshshah07
Copy link

I just commented promise.cancel() as said in the book(4th Edition) and i am not getting error as said in the book.
Please fix the package.json (I guess).Maybe this problem of cleaning was in older versions.

@harshshah07
Copy link
Author

harshshah07 commented Oct 8, 2022

I just modified package.json as
"bluebird": "^3.5.5", "react": "^17.0.0", "react-dom": "^17.0.0", "react-scripts": "^4.0.3"
and index.js as

import App from "./App";
import React from 'react';
import ReactDOM from 'react-dom';

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

This change is showing error.Please update the code.

Also React 18 has solved this issue of resetting state.See React Repo
This book is not updated to React 18.😞 @adamboduch @royderks

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

No branches or pull requests

1 participant