@@ -138,7 +138,7 @@ export const createInstance = (defaultProps = {}) => {
138138 * @prop {boolean } persist Show until we have data, even while loading or when an error occurred
139139 * @prop {Function|Node } children Function (passing state) or React node
140140 */
141- Async . Pending = ( { children, persist } ) => (
141+ const Pending = ( { children, persist } ) => (
142142 < Consumer >
143143 { state => {
144144 if ( state . data !== undefined ) return null
@@ -155,7 +155,7 @@ export const createInstance = (defaultProps = {}) => {
155155 * @prop {boolean } initial Show only on initial load (data is undefined)
156156 * @prop {Function|Node } children Function (passing state) or React node
157157 */
158- Async . Loading = ( { children, initial } ) => (
158+ const Loading = ( { children, initial } ) => (
159159 < Consumer >
160160 { state => {
161161 if ( ! state . isLoading ) return null
@@ -171,7 +171,7 @@ export const createInstance = (defaultProps = {}) => {
171171 * @prop {boolean } persist Show old data while loading
172172 * @prop {Function|Node } children Function (passing data and state) or React node
173173 */
174- Async . Resolved = ( { children, persist } ) => (
174+ const Resolved = ( { children, persist } ) => (
175175 < Consumer >
176176 { state => {
177177 if ( state . data === undefined ) return null
@@ -188,7 +188,7 @@ export const createInstance = (defaultProps = {}) => {
188188 * @prop {boolean } persist Show old error while loading
189189 * @prop {Function|Node } children Function (passing error and state) or React node
190190 */
191- Async . Rejected = ( { children, persist } ) => (
191+ const Rejected = ( { children, persist } ) => (
192192 < Consumer >
193193 { state => {
194194 if ( state . error === undefined ) return null
@@ -198,6 +198,11 @@ export const createInstance = (defaultProps = {}) => {
198198 </ Consumer >
199199 )
200200
201+ Async . Pending = Pending
202+ Async . Loading = Loading
203+ Async . Resolved = Resolved
204+ Async . Rejected = Rejected
205+
201206 return Async
202207}
203208
0 commit comments