Comments (22)
Seconding this, I'm getting unable to resolve dependency tree
when trying to install on a new React project...
from use-http.
It will give you an error.
More a warning I would say, this library has not been certified compatible with React v18 yet.
I have been using it with React v18 without too much problems other than this issue here with <StrictMode />
If you happen to know a way to make it fully compatible with React v18, feel free to contribute, this is Open Source ;)
from use-http.
Oh okay, I have not used npm in years now, did not know it would prevent to install it 🤷
yarn just warns about the version potentially not supported. the --force
flag of npm should work until this issue is resolved
from use-http.
If someone creates a PR for this I'll gladly accept it.
from use-http.
@krishnasaga it's MIT licensed, you already have permission.
from use-http.
It installs fine for me, try with --legacy-peer-deps
flag.
from use-http.
It installs fine for me, try with
--legacy-peer-deps
flag.
Thanks , indeed it installs with this flag , however, in runtime I realized that use-http doesn't work with React.StrictMode and React 18...
found a related issue :
#368
from use-http.
Did any one found the root cause of what causing this ?
from use-http.
zvi1977 I added my findings of root cause here #368 (comment).
from use-http.
How is it even possible that this library is not supporting v18? :O
from use-http.
@enriquemorenotent what do you men by not supporting ?
from use-http.
@krishnasaga Have you tried doing npm i use-http
on a React v18 app? It will give you an error.
You can "force it", of course. But it doesn't inspire a lot of confidence.
from use-http.
@enriquemorenotent There reason you receive this error is because of this
Lines 17 to 19 in 031b2ee
By resolving this issue and successfully passing all the tests. use-http can start supporting react 18. then we can update the pear dependencies so you will not get that error when you install it.
from use-http.
@krishnasaga I am not sure I understand what you are asking me...
from use-http.
@flo-sch I would call it a warning, if it actually installed the package. But since it doesn't, I call it an error.
Sadly no, I have no idea how to make it work.
from use-http.
@alex-cory there is a duplicate of this thread which I have mentioned. If it making sense to close one of those could you do it please ?
from use-http.
@alex-cory Can I have your permission to copy the code of use-http to use directly in my project without importing, so I can have have that fix in my project without needing to depend on the release and also allows me to battle test it against multiple scenarios.
from use-http.
Is there a timeline on react 18 support? our company pipeline doesnt allow force or using legacy deps when doing npm install
from use-http.
Lol, that's something I never heard of. For me 9 out of 10 projects have to use --legacy-peer-deps
. Just because a package hasn't been updated since the release of npm v7 it doesn't mean it's a security risk.
from use-http.
from use-http.
from use-http.
from use-http.
Related Issues (20)
- [Question] How to change the interceptor's request route value? HOT 1
- function to overwrite global options don't update after dependency change HOT 6
- useFetch `post` call inserts quotes when passed a string HOT 6
- React Native and Cache
- [Feature Request] time denounce http get requests
- does useFetch have option for skip request?
- Data not populated at mount HOT 5
- `Error: Invalid hook call` after upgrading to React 18.1 HOT 1
- Interceptors aren't chained HOT 8
- Cannot abort delayed retries
- use-Fetch Post is having issue with csrf headers HOT 7
- [Feature Request] A way to invalidate the cache HOT 1
- Upload File Progress
- can recall post when parameter change?
- does post can auto fire? HOT 2
- Eslint rule react-hooks/exhaustive-deps questions on having response as depency HOT 1
- React 18 not supported? HOT 1
- Following instructions in .github/contributing.md fails when using the latest React 18 HOT 2
- Initial URL with a trailing slash adds double slash on relative urls
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from use-http.