Skip to content

React 18 StrictMode #369

Open
Open

Description

@zvi1977

Hi,
Are there plans to support React 18 ?

Activity

  1. t3db0t commented on May 24, 2022

    @t3db0t

    Seconding this, I'm getting unable to resolve dependency tree when trying to install on a new React project...

  2. wintercounter commented on May 28, 2022

    @wintercounter

    It installs fine for me, try with --legacy-peer-deps flag.

  3. zvi1977 commented on May 29, 2022

    @zvi1977
    Author

    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

  4. changed the title [-]React 18[/-] [+]React 18 StrictMode[/+] on May 29, 2022
  5. krishnasaga commented on Dec 3, 2022

    @krishnasaga
    Contributor

    Did any one found the root cause of what causing this ?

  6. krishnasaga commented on Dec 4, 2022

    @krishnasaga
    Contributor

    zvi1977 I added my findings of root cause here #368 (comment).

    #368

  7. enriquemorenotent commented on Jan 20, 2023

    @enriquemorenotent

    How is it even possible that this library is not supporting v18? :O

  8. krishnasaga commented on Jan 23, 2023

    @krishnasaga
    Contributor

    @enriquemorenotent what do you men by not supporting ?

  9. enriquemorenotent commented on Jan 23, 2023

    @enriquemorenotent

    @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.

  10. krishnasaga commented on Jan 23, 2023

    @krishnasaga
    Contributor

    @enriquemorenotent There reason you receive this error is because of this

    use-http/package.json

    Lines 17 to 19 in 031b2ee

    "peerDependencies": {
    "react": "^16.13.1 || ^17.0.0",
    "react-dom": "^16.13.1 || ^17.0.0"
    it is explicitly mentioned in pear dependencies as react 16 or react 17

    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.

  11. enriquemorenotent commented on Jan 23, 2023

    @enriquemorenotent

    @krishnasaga I am not sure I understand what you are asking me...

  12. flo-sch commented on Jan 24, 2023

    @flo-sch

    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 ;)

  13. enriquemorenotent commented on Jan 24, 2023

    @enriquemorenotent

    @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.

  14. flo-sch commented on Jan 24, 2023

    @flo-sch

    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

  15. krishnasaga commented on Mar 13, 2023

    @krishnasaga
    Contributor

    @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 ?

  16. iamthesiz commented on Mar 14, 2023

    @iamthesiz
    Collaborator

    If someone creates a PR for this I'll gladly accept it.

  17. krishnasaga commented on Apr 9, 2023

    @krishnasaga
    Contributor

    @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.

  18. csvan commented on Apr 25, 2023

    @csvan

    @krishnasaga it's MIT licensed, you already have permission.

  19. TannerS commented on Jun 29, 2023

    @TannerS

    Is there a timeline on react 18 support? our company pipeline doesnt allow force or using legacy deps when doing npm install

  20. wintercounter commented on Jun 30, 2023

    @wintercounter

    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.

  21. TannerS commented on Jun 30, 2023

    @TannerS
  22. wintercounter commented on Jun 30, 2023

    @wintercounter
  23. TannerS commented on Jun 30, 2023

    @TannerS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions