Coder Social home page Coder Social logo

Comments (8)

josephsavona avatar josephsavona commented on July 27, 2024 1

Thanks for posting. The compiler does not yet support nested component definitions (components defined within another component). This is something we may add support for in the future depending on demand.

In the meantime though, we should provide a better diagnostic (“nested components not yet supported”) rather than throw a hook error.

from react.

josephsavona avatar josephsavona commented on July 27, 2024 1

@RafaelJohn9 we're open to PRs to improve the warning!

from react.

RafaelJohn9 avatar RafaelJohn9 commented on July 27, 2024

@josephsavona

In the meantime though, we should provide a better diagnostic (“nested components not yet supported”) rather than throw a hook error.

Can I work on this, or it was just an afterthought

from react.

RafaelJohn9 avatar RafaelJohn9 commented on July 27, 2024

@josephsavona, I will be working on it.

from react.

last-Programmer avatar last-Programmer commented on July 27, 2024

we are also getting this kind of error in our application when using react-compiler. this is not the eslint warnings. happens actually while running the application

@NMinhNguyen Is this only eslint warning or error happens while running the application? thanks

from react.

josephsavona avatar josephsavona commented on July 27, 2024

@last-Programmer the error here is specifically reported by the ESLint plugin. It can be reported by the Babel plugin, but only if you’ve changed the plugin settings, which we don’t recommend.

So most likely you’re seeing a different error, can you create a separate issue please w info on how to reproduce? Thanks!

from react.

RafaelJohn9 avatar RafaelJohn9 commented on July 27, 2024

hey @josephsavona sorry, I did not notice earlier my PR has merge conflicts, I'll close it and make another PR.
I do have a question, am I to add tests to the changes that I have made, and if I am to, what about the previous tests that were written?
Thank you in advance.

from react.

RafaelJohn9 avatar RafaelJohn9 commented on July 27, 2024

@josephsavona

from react.

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.