2020-09-04
1421
#react#reference guide
Ovie Okeh
24391
Sep 4, 2020 â‹… 5 min read

React Reference Guide: Render props

Ovie Okeh Programming enthusiast, lover of all things that go beep.

Recent posts:

Building multi-region infrastructure with AWS

This isn’t theory. It’s the exact setup you need to deliver fast, resilient apps across AWS regions with zero fluff.

Marie Starck
May 13, 2025 â‹… 5 min read
the nine best FaunaDB alternatives for 2025

The 9 best FaunaDB alternatives for 2025

Looking for a FaunaDB alternative to migrate to? Examine nine other platforms you can use and factors to consider when choosing an alternative.

Nefe Emadamerho-Atori
May 13, 2025 â‹… 7 min read
Techniques To Circulate And Record Knowledge In Engineering Teams

Techniques to circulate and record knowledge in engineering teams

From onboarding to bug tracking, these knowledge-sharing techniques keep your team aligned, reduce overhead, and build long-term technical clarity.

Marie Starck
May 12, 2025 â‹… 4 min read
WebSockets Tutorial With Node And React

React WebSocket tutorial: Real-time messaging with WebSockets and Socket.IO

Learn how to build a real-time collaborative document editing app with a Node.js backend and React frontend using the WebSocket protocol.

Avanthika Meenakshi
May 12, 2025 â‹… 15 min read
View all posts

One Reply to "React Reference Guide: Render props"

  1. The caveats section says that

    “`
    const DismissableContent = () => {
    const content = (dismiss) =>

    return (

    )
    }
    “`

    avoids extra re-renders compared to

    “`
    const DismissableContent = () => {
    return (
    } />
    )
    }
    “`

    but both variants still recreate the inline function on every re-render. What should work is one of the following:

    “`
    const content = (dismiss) =>
    const DismissableContent = () => {
    return (

    )
    }
    “`

    “`
    const DismissableContent = () => {
    const content = useCallback((dismiss) => , []);
    return (

    )
    }
    “`

Leave a Reply