Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't re-render whole app for stream of event text #5

Open
daretodave opened this issue Apr 21, 2024 · 0 comments
Open

Don't re-render whole app for stream of event text #5

daretodave opened this issue Apr 21, 2024 · 0 comments
Labels
good first issue Good for newcomers react-wizard-needed bless us with your react skills ready

Comments

@daretodave
Copy link
Contributor

Steps to repro:

  • Open mterm
  • Run :test
  • Each output from this command rerenders the whole page
    • This is also true for any streaming event
  • Where to fix?
    • There needs to be a subcomponent solution, the event for the handling of stream events is here -
      window.electron.ipcRenderer.on(
      'runtime.commandEvent',
      async (_, streamEntry: ResultStreamEvent) => {
      console.log(streamEntry)
      await reloadRuntimesFromBackend()
      }
      )
    • There is an argument passed to this event (right now being ignored sorta) -
      export interface ResultStreamEvent {
      runtime: string
      command: string
      entry: ResultStream
      }
    • Instead of taking the event and rendering the whole page again, we should look at the effected command (history) and runtime (tab) and run an update there
    • This prob means moving the result content to it's own component but idk
@daretodave daretodave added the good first issue Good for newcomers label Apr 21, 2024
@daretodave daretodave added react-wizard-needed bless us with your react skills ready labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers react-wizard-needed bless us with your react skills ready
Projects
None yet
Development

No branches or pull requests

1 participant