š¼ļø A library to show colorful blurry placeholders while your content loads.
This release fixes a regression in which the <Blurhash>
component has been converted to a FunctionComponent (FC<P,S,SS>
).
<Blurhash>
component back to Class Component (PureComponent<P,S,SS>
)
createAnimatedComponent(Blurhash)
This release includes a few minor code improvements:
isBlurhashValid(...)
function that checks if a given string is a valid encoded blurhash. (Non-native method)1.0.27 comes with the following changes:
Blurhash.encode()
support, since now you can use all URIs the native React Native Image Loader (iOS: RCTImageLoader
, Android: Fresco
) supports! This includes http
, https
, base64 (data:image/
), and even local files!This release contains:
onLoadStart
event: Emitted when the Blurhash received new parameters and started to decode the given blurhash
string.onLoadEnd
event: Emitted when the Blurhash successfully decoded the given blurhash
string and rendered the image to the <Blurhash>
viewonLoadError
event: Emitted when the Blurhash failed to load. UseĀ the message
parameterĀ to get the error message.This release includes:
This release includes:
const color = Blurhash.getAverageColor('LGFFaXYk^6#M@-5c,1J5@[or[Q6.')
This function decodes the characters 3 to 6 ('FFaX'
) using the Typescript decode83
function.