-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
so as it turns out styles should be cached for performance. Stylesheet uses a method called ReactNativePropRegistry.register(obj[key]); which effectively takes a style sheet like
let sheet = Stylesheet.create({
red: {
color: 'red'
},
blue: {
color: 'blue'
}
})
and creates an object with cached references (simple numbers)
sheet = {
red: 17,
blue: 18
}
So because this library uses inline styles we should be using number references for styles as well instead of actual styles. Should be fun and pretty easy to implement.