Created
May 5, 2025 20:27
-
-
Save therealparmesh/af71ace1d96a3b8888fa99c70c644d9b to your computer and use it in GitHub Desktop.
log react native stylesheet to console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
try { | |
const { | |
sheet: { cssRules }, | |
} = document.getElementById('react-native-stylesheet'); | |
const cssText = Array.from(cssRules) | |
.map(({ cssText }) => cssText) | |
.filter(Boolean) | |
.join('\n\n'); | |
console.log('--- Plain CSS Output ---'); | |
console.log(cssText); | |
console.log('--- End Output ---'); | |
return cssText; | |
} catch (e) { | |
console.error('Error:', e); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment