Home / Function/ Comment() — react Function Reference

Comment() — react Function Reference

Architecture documentation for the Comment() function in index.js from the react codebase.

Entity Profile

Dependency Diagram

graph TD
  044f045e_c4b3_154c_cf3b_87ba59fc5550["Comment()"]
  b33e75ba_61cb_bac4_209f_a34cd3203f8b["index.js"]
  044f045e_c4b3_154c_cf3b_87ba59fc5550 -->|defined in| b33e75ba_61cb_bac4_209f_a34cd3203f8b
  style 044f045e_c4b3_154c_cf3b_87ba59fc5550 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fixtures/eslint-v8/index.js lines 5–24

function Comment({comment, commentSource}) {
  const currentUserID = comment.viewer.id;
  const environment = RelayEnvironment.forUser(currentUserID);
  const commentID = nullthrows(comment.id);
  useEffect(() => {
    const subscription = SubscriptionCounter.subscribeOnce(
      `StoreSubscription_${commentID}`,
      () =>
        StoreSubscription.subscribe(
          environment,
          {
            comment_id: commentID,
          },
          currentUserID,
          commentSource
        )
    );
    return () => subscription.dispose();
  }, [commentID, commentSource, currentUserID, environment]);
}

Domain

Subdomains

Frequently Asked Questions

What does Comment() do?
Comment() is a function in the react codebase, defined in fixtures/eslint-v8/index.js.
Where is Comment() defined?
Comment() is defined in fixtures/eslint-v8/index.js at line 5.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free