react-refresh-webpack-plugin icon indicating copy to clipboard operation
react-refresh-webpack-plugin copied to clipboard

Can I prevent some react component be accepted?

Open zhoudaxia2016 opened this issue 2 years ago • 1 comments

A situation: I have a component A whitch extends another component B. When I edit component B, I want to update component A. B is considered as a react refresh boundary, so B accepts updates for itself.

I searched in the source code, I did not find a hook that can check a file if the file is a react refresh boundary myself. Or I have other way to solve my problem ?

Thanks to view.

zhoudaxia2016 avatar Dec 17 '22 07:12 zhoudaxia2016

After reading through the source code, I have some ideas. Can we pass options to config two things below?

  1. registerExportsForReactRefresh. Regist more component when a component update
  2. isReactRefreshBoundary. Check if a file is ReactRefreshBoundary

zhoudaxia2016 avatar Dec 19 '22 04:12 zhoudaxia2016