Back to all reviewers

platform API consistency

facebook/react-native
Based on 2 comments
Java

When implementing cross-platform functionality, prioritize consistency and avoid replicating platform-specific bugs or inconsistencies. Consider the broader architectural impact of API choices, especially when they require significant migrations or affect multiple components.

Networking Java

Reviewer Prompt

When implementing cross-platform functionality, prioritize consistency and avoid replicating platform-specific bugs or inconsistencies. Consider the broader architectural impact of API choices, especially when they require significant migrations or affect multiple components.

For example, when choosing between platform-specific APIs (like AndroidX ComponentActivity.enableEdgeToEdge()) versus custom implementations, evaluate:

  • Migration scope and complexity across the codebase
  • Consistency requirements across different UI contexts (Activities, Dialogs, Modals)
  • Whether platform-specific behaviors should be replicated or corrected
// Avoid replicating iOS bugs for the sake of parity
if (data.mAnimated) {
  scrollView.reactSmoothScrollTo(data.mDestX, data.mDestY);
  scrollView.handleSmoothScrollMomentumEvents(); // Only for animated scrolls
} else {
  scrollView.scrollTo(data.mDestX, data.mDestY);
  // Don't emit momentum events for non-animated scrolls
}

Note: These discussions focus on UI/platform concerns rather than networking protocols, which suggests a category mismatch in the analysis request.

2
Comments Analyzed
Java
Primary Language
Networking
Category

Source Discussions