Giter Club home page Giter Club logo

Comments (3)

ArnaudBarre avatar ArnaudBarre commented on July 22, 2024 1

I can try to better report errors, but this case is justified and the error is always more for the file than for a specific export.

This file can't be correctly Fast Refresh sadly (this technically could be should have support from the runtime to check that the object only export components et exactly the same keys than in the previous update, which not a one line simple update)

from eslint-plugin-react-refresh.

skovhus avatar skovhus commented on July 22, 2024 1

Thanks. Yeah I understand that it isn't supported by fast refresh, but it would be great to improve the warning placement to the actual variables that are exported.

from eslint-plugin-react-refresh.

ArnaudBarre avatar ArnaudBarre commented on July 22, 2024

So actually I've look at it and it correctly warns on all components that could loose state on Fast Refresh.
The action is too split the components from the export, sometimes it would mean moving the component to another file because it makes sense to export an object containing a component in that file, sometimes this would mean moving the export to another file because it's mostly an helper.
I think the current behaviour is ok but I'm open to changing the warning message to something else that would make it more clear when on the export side

from eslint-plugin-react-refresh.

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.