enuchi / React-Google-Apps-Script

This is your boilerplate project for developing React apps inside Google Sheets, Docs, Forms and Slides projects. It's perfect for personal projects and for publishing complex add-ons in the Google Workspace Marketplace.
MIT License
1.32k stars 171 forks source link

infinity cycle refresh/reload by dev server when change the code #200

Open dandgerson opened 1 year ago

dandgerson commented 1 year ago

Hi, @enuchi and other contributors thanks for the boilerplate!!

The problem with infinity cycle refresh/reload (by the dev server, i guess) appear when i add some more complicated codebase (components and other stuff) and try to change the code.

When infinity cycle refresh/reload appears:

How to we can fix this problem? Have any had this problem with infinity cycle refresh/reload?

The sample project where i reproduced behavior: https://github.com/dandgerson/google-sheets-plugin

maybe it behave because of reduxjs/toolkit

// src/client/sidebar-about-page/index.js
root.render(
  <Provider store={store}>
    <About />
  </Provider>
);
komarov-sergey commented 1 year ago

@enuchi I have the same issue...

randy-mammoth-labs commented 4 months ago

@dandgerson did you ever resolve this?

dandgerson commented 3 weeks ago

@randy-mammoth-labs Sorry, Bro. I'm not solve that problem without community helping. Guess switching from rtk to another state manager can help

enuchi commented 3 weeks ago

Hey all, recently updated this repo to use vite for dev server instead of webpack dev server. This is much more lightweight with faster builds and refreshes etc. If you start with a fresh clone I doubt you will see infinite loop issues.