ArnaudBarre / eslint-plugin-react-refresh

Validate that your components can safely be updated with Fast Refresh
MIT License
206 stars 13 forks source link

Please add better description what it does #28

Open dzek69 opened 1 year ago

dzek69 commented 1 year ago

Hello, I found this repo by accident, someone just used your library.

I took a look at readme and I completely don't know what this is all about.

Having only one sentence:

Validate that your components can safely be updated with fast refresh.

is probably not enough. As a new user I see some limitations, some options, but no answer for: why would a component be unsafe for fast refresh? It would be useful to indicate some sources describing the problem in the first place. Even explaining what a fast refresh is (in a form of external link, I don't suggest to put a encyclopedia in the README) could be useful.

Personally I'm not even sure if I need it, is this webpack specific feature, is my version of React using it? Previously we had hot module replacement, quick Googling suggests that fast refresh is replacing it. But I needed to scroll some results to get this information - Googling fast refresh react I get highlighted answer that Fast Refresh is a feature of React Native, which is probably a bad answer as this library is definitely not intented to be React Native only. But users may get a feeling this library is not useful for them if they are working with web.

Thanks

ArnaudBarre commented 1 year ago

Thanks for the feedback. I could add some links but yeah I should work on the real issue: there is no official doc on what is Fast Refresh, there is only the initial version that was created for react native and that been copied over the Gatsby & Next docs.

dzek69 commented 1 year ago

I understand. Nonetheless you gathered knowledge about when Fast Refresh can get broken - I think linking to something, even not directly focued on this specific topic is still better than nothing. It could be even Stack Overflow link.