React on rails logo
React on Rails Pro
ShakaCode WebsiteCommunityReact on Rails Pro
Search
    Search by
    • Home
    • Add stream and interactivity to rsc page
    • Bundle caching
    • Caching
    • Code splitting loadable components
    • Code splitting
    • Create react server component without ssr
    • Configuration
    • Glossary
    • How react server components work
    • Installation
    • Js memory leaks
      • Finding Memory Leaks
      • Causes of Memory Leaks
      • Mobx (mobx-react)
    • Profiling server side rendering code
    • React server components inside client components
    • React server components rendering flow
    • React server components tutorial
    • React server components
    • Ruby api
    • Selective hydration in streamed components
    • Ssr react server components
    • Troubleshooting
    • Streaming server rendering
    • Updating
    Node renderer
    • Basics
    • Debugging
    • Error reporting and tracing
    • Heroku
    • Js configuration
    • Troubleshooting
    Contributors info
    • Onboarding customers
    • Style
    Release notes
    • 4.0
    Shakacode logoShakaCodeDeveloped by

    Copyright 2020 ShakaCode

    JS Memory Leaks

    Finding Memory Leaks

    For memory leaks, see node-memwatch. Use the —inspect flag to make and compare heap snapshots.

    Causes of Memory Leaks

    Mobx (mobx-react)

    import { useStaticRendering } from "mobx-react";
    
    const App = (props, railsContext) => {
      const { location, serverSide } = railsContext;
      const context = {};
    
      useStaticRendering(true);
    • See details here: Mobx site