Giter VIP home page Giter VIP logo

Comments (12)

s-bose avatar s-bose commented on May 28, 2024 1

Yes. But they're not conflicting. Basically my_project/node_modules/react == 17, and my_project/node_modules/active-table-react/node_modules/react == 18.

Does that make sense?
Can you just make react a peer dependency so it just reuses the installed react library?
From what I've seen it should work on react 17 as well.

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024 1

I believe this concludes the work for this issue, nevertheless if you believe something may need to be changed feel free to comment below and reopen this thread :)

Once again, thankyou very much for raising the issue and letting me know about this fantastic optimization opportunity!

Just to note, the official release date for this component will be at the end of this month or the start of next, hence why the component is using the 0.0.x version increments. If you find any bugs or have suggestions for improvements, DO NOT HESITATE to raise new issues and I will be very happy to discuss them accordingly :)

Thanks again! 💯

from active-table.

s-bose avatar s-bose commented on May 28, 2024 1

Thank you so much for responding so fast and taking my thoughts into consideration. Appreciate the effort! 💯

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

Hi @s-bose, I'm trying to understand the nature of your problem. Do you mean that because active-table-react is using React 18 - your project is now importing two react libraries: 17 and 18? Hence, is the issue itself the total size of your project due to the use of two react packages or are there errors on your end which prevent the component from working. Any information to help me understand this better will help, thankyou!

from active-table.

s-bose avatar s-bose commented on May 28, 2024

Hello. What I'm trying to say is that when installing active-table-react in a react 17 project it works just as intended except the active-table-react package in my project's node_modules has also installed its own react package inside its own node_modules. It is not messing up the main react 17 in my project but can you please make the react dependency a peer dependency? Maybe that would fix it?
Apologies for the confusion. I'm comparatively new to the react ecosystem.

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

Ok, so to my understanding its a two React library problem?

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

Yep, I'll investigate to find the best solution

from active-table.

s-bose avatar s-bose commented on May 28, 2024

Thanks mate. Cheers!

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

Just to note, once I do have the solution, I'll need to fully test it out across various react versions and other react supported frameworks like Next which may take some time. I should have this all settled in 1-2 hours, I'll report on my progress in this thread.

from active-table.

s-bose avatar s-bose commented on May 28, 2024

No worries at all. I would be more than happy to help if you need anything

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

As per your suggestion, I have used the peerDependencies property to set the allowed react versions as follows:
"react": ">=17.0.1 || >=18.0.0".

This is available in the 0.0.15 version of the active-table-react package. The reason why I have specified the minimum react version to be 17.0.1 and not 17.0.0 is because that is the minimal minor/patch version being used by the @lit/labs-react library which this package is using as a wrapper to work in react - reference here.

Technically, web components should be supported by react version 16, however I am getting a variety of issues for it and will continue investigating a little further to see if I can get it to work for that. Nevertheless, it should be working fine for 17 and 18 :)

Thanks again, I would have not been able to do this without your help!

from active-table.

OvidijusParsiunas avatar OvidijusParsiunas commented on May 28, 2024

I have tested this further and the earliest react version that I could get this working on was 16.8.0. I have henceforth changed the peerDependencies property react value to >=16.8.0 || >=17.0.0 || >=18.0.0 which is available in the active-table-react version 0.0.16.

from active-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.