From 30a2ff7909df07d5188c4dbeae719d46562ef778 Mon Sep 17 00:00:00 2001 From: Dylan Vann Date: Wed, 13 Jun 2018 20:34:30 -0400 Subject: [PATCH] Add fallback option. --- src/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/index.js b/src/index.js index 5d4daf9..50d2336 100644 --- a/src/index.js +++ b/src/index.js @@ -31,11 +31,30 @@ class FastImage extends Component { onLoadEnd, style, children, + fallback, ...props } = this.props const resolvedSource = resolveAssetSource(source) + if (fallback) { + return ( + + + {children} + + ) + } + return (