fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.93k stars 284 forks source link

Don't rerender cell output when only `persist_js_state` changed #2697

Closed fonsp closed 9 months ago

fonsp commented 9 months ago

This changes the useLayoutEffect diffing array to no longer include persist_js_state for the RawHTMLContainer component. If this is the only value that changed, then we don't want to rerender the HTML contents: this value should say something about how a re-render should happen, but it shouldn't trigger one.

Also added a test that includes lots of JS API :)

github-actions[bot] commented 9 months ago

Try this Pull Request!

Open Julia and type:

  julia> import Pkg
  julia> Pkg.activate(temp=true)
  julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="don't-rerender-when-only-persist_js_state-changed")
  julia> using Pluto