How samuel-rl/react-native-squircle works
Main Components Layer
• Divide it into three main sections:
a. Core Component Layer
b. Utilities Layer
c. Integration Layer
Core Component Layer (Primary Focus)
• borderRadius
• backgroundColor
• borderSmoothing
• children
• maskChildren
• skiaChildren
• style
Dependencies Layer
• React Native (platform)
• React Native Skia (rendering engine)
Implementation Patterns
• Three usage patterns (from example/src/components):
• DefaultSquircle
• ReactChildrenSquircle
• SkiaMaskChildrenSquircle
Rendering Pipeline
a. Input Props Processing
b. Path Calculation
c. Skia Canvas Rendering
d. Final Output
• Use rounded rectangles for components
• Use sharp rectangles for utilities
• Use hexagons for external dependencies
• → for direct dependencies
• ⇢ for data flow
• ⇄ for two-way interactions
Labels
• Use clear, concise text
• Version numbers where relevant