I notice react native demo code always show below usage.
const styles = StyleSheet.create({
// ... some styles
});
I'm newbie that don't deeply understand memory management of GC, but if in above way, will variable styles
be freed? if so, when?
I think this styles
is global variable in this module, and I'm not sure that whether do below method maybe better..
this.styles = StyleSheet.create(); // in the module.exports
will anybody provide any suggestions?
thanks for your time.