Skip to content

Ambiguous this in the 'Synchronizing with effects' #5674

Closed
@prashantbhudwal

Description

@prashantbhudwal

Description

In the sentence "Sometimes this isn't enough" it is not clear what "this" refers to. It it refers to the Event handling bullet point, then it should be the part of that bullet point.

File

https://github.com/reactjs/reactjs.org/blob/main/beta/src/content/learn/synchronizing-with-effects.md

Section:

Before getting to Effects, you need to be familiar with two types of logic inside React components:

  • Rendering code ...
  • Event handlers ...

Sometimes this isn't enough. Consider a ChatRoom component that must connect to the chat server whenever it's visible on the screen. Connecting to a server is not a pure calculation (it's a side effect) so it can't happen during rendering. However, there is no single particular event like a click that causes ChatRoom to be displayed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions