{"expireTime":9007200821600206000,"key":"gatsby-plugin-mdx-entire-payload-061d48f74de72e118c649ca0386eefae-","val":{"mdast":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"There are five distinct states to any data fetching request:","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":61,"offset":61},"indent":[]}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":61,"offset":61},"indent":[]}},{"type":"table","align":[null,null],"children":[{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"State","position":{"start":{"line":4,"column":3,"offset":65},"end":{"line":4,"column":8,"offset":70},"indent":[]}}],"position":{"start":{"line":4,"column":3,"offset":65},"end":{"line":4,"column":13,"offset":75},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Data","position":{"start":{"line":4,"column":16,"offset":78},"end":{"line":4,"column":20,"offset":82},"indent":[]}}],"position":{"start":{"line":4,"column":16,"offset":78},"end":{"line":4,"column":85,"offset":147},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":63},"end":{"line":4,"column":87,"offset":149},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"Empty","position":{"start":{"line":6,"column":3,"offset":239},"end":{"line":6,"column":8,"offset":244},"indent":[]}}],"position":{"start":{"line":6,"column":3,"offset":239},"end":{"line":6,"column":13,"offset":249},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Nothing has been requested","position":{"start":{"line":6,"column":16,"offset":252},"end":{"line":6,"column":42,"offset":278},"indent":[]}}],"position":{"start":{"line":6,"column":16,"offset":252},"end":{"line":6,"column":85,"offset":321},"indent":[]}}],"position":{"start":{"line":6,"column":1,"offset":237},"end":{"line":6,"column":87,"offset":323},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"Fetching","position":{"start":{"line":7,"column":3,"offset":326},"end":{"line":7,"column":11,"offset":334},"indent":[]}}],"position":{"start":{"line":7,"column":3,"offset":326},"end":{"line":7,"column":13,"offset":336},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Request is in process for the first time","position":{"start":{"line":7,"column":16,"offset":339},"end":{"line":7,"column":56,"offset":379},"indent":[]}}],"position":{"start":{"line":7,"column":16,"offset":339},"end":{"line":7,"column":85,"offset":408},"indent":[]}}],"position":{"start":{"line":7,"column":1,"offset":324},"end":{"line":7,"column":87,"offset":410},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"Refetching","position":{"start":{"line":8,"column":3,"offset":413},"end":{"line":8,"column":13,"offset":423},"indent":[]}}],"position":{"start":{"line":8,"column":3,"offset":413},"end":{"line":8,"column":13,"offset":423},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Request has already returned data but is in process for a second time","position":{"start":{"line":8,"column":16,"offset":426},"end":{"line":8,"column":85,"offset":495},"indent":[]}}],"position":{"start":{"line":8,"column":16,"offset":426},"end":{"line":8,"column":85,"offset":495},"indent":[]}}],"position":{"start":{"line":8,"column":1,"offset":411},"end":{"line":8,"column":88,"offset":498},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"Success","position":{"start":{"line":9,"column":3,"offset":501},"end":{"line":9,"column":10,"offset":508},"indent":[]}}],"position":{"start":{"line":9,"column":3,"offset":501},"end":{"line":9,"column":13,"offset":511},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Request has completed and returned requested data","position":{"start":{"line":9,"column":16,"offset":514},"end":{"line":9,"column":65,"offset":563},"indent":[]}}],"position":{"start":{"line":9,"column":16,"offset":514},"end":{"line":9,"column":85,"offset":583},"indent":[]}}],"position":{"start":{"line":9,"column":1,"offset":499},"end":{"line":9,"column":88,"offset":586},"indent":[]}},{"type":"tableRow","children":[{"type":"tableCell","children":[{"type":"text","value":"Error","position":{"start":{"line":10,"column":3,"offset":589},"end":{"line":10,"column":8,"offset":594},"indent":[]}}],"position":{"start":{"line":10,"column":3,"offset":589},"end":{"line":10,"column":13,"offset":599},"indent":[]}},{"type":"tableCell","children":[{"type":"text","value":"Request has failed and returned an error","position":{"start":{"line":10,"column":16,"offset":602},"end":{"line":10,"column":56,"offset":642},"indent":[]}}],"position":{"start":{"line":10,"column":16,"offset":602},"end":{"line":10,"column":85,"offset":671},"indent":[]}}],"position":{"start":{"line":10,"column":1,"offset":587},"end":{"line":10,"column":87,"offset":673},"indent":[]}}],"position":{"start":{"line":4,"column":1,"offset":63},"end":{"line":10,"column":87,"offset":673},"indent":[1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"RequestState is a variant that allows the user to render the different states of a request in a declarative manner. It's api gives you a clear way of handling each possible state and makes sure your app is never rendering an unpredicted state.","position":{"start":{"line":14,"column":1,"offset":677},"end":{"line":14,"column":244,"offset":920},"indent":[]}}],"position":{"start":{"line":14,"column":1,"offset":677},"end":{"line":14,"column":244,"offset":920},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"class RequestState {\n\n    // Map\n    emptyMap(mapper: RequestStateMapper) => RequestState\n    fetchingMap(mapper: RequestStateMapper) => RequestState\n    refetchingMap(mapper: RequestStateMapper) => RequestState\n    successMap(mapper: RequestStateMapper) => RequestState\n    errorMap(mapper: RequestStateMapper) => RequestState\n        \n    // FlatMap\n    emptyFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    fetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    refetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    successFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    errorFlatMap(mapper: RequestStateFlatMapper) => RequestState\n\n    // Casting\n    toEmpty() => RequestState\n    toFetching() => RequestState\n    toRefetching() => RequestState\n    toSuccess() => RequestState\n    toError() => RequestState\n\n    // States\n    isEmpty: boolean;\n    isFetching: boolean;\n    isRefetching: boolean;\n    isSuccess: boolean;\n    isError: boolean;\n\n    value(defaultValue: *) => *\n}","position":{"start":{"line":17,"column":1,"offset":923},"end":{"line":50,"column":4,"offset":1965},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Properties","position":{"start":{"line":52,"column":4,"offset":1970},"end":{"line":52,"column":14,"offset":1980},"indent":[]}}],"position":{"start":{"line":52,"column":1,"offset":1967},"end":{"line":52,"column":14,"offset":1980},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".is{State}","position":{"start":{"line":54,"column":5,"offset":1986},"end":{"line":54,"column":15,"offset":1996},"indent":[]}}],"position":{"start":{"line":54,"column":1,"offset":1982},"end":{"line":54,"column":15,"offset":1996},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"State properties hold the raw booleans to describe the request state. ","position":{"start":{"line":57,"column":1,"offset":1999},"end":{"line":57,"column":71,"offset":2069},"indent":[]}}],"position":{"start":{"line":57,"column":1,"offset":1999},"end":{"line":57,"column":71,"offset":2069},"indent":[]}},{"type":"paragraph","children":[{"type":"emphasis","children":[{"type":"text","value":"They are easy to access but map functions or ","position":{"start":{"line":59,"column":2,"offset":2072},"end":{"line":59,"column":47,"offset":2117},"indent":[]}},{"type":"linkReference","identifier":"loadingboundary","label":"LoadingBoundary","referenceType":"shortcut","children":[{"type":"text","value":"LoadingBoundary","position":{"start":{"line":59,"column":48,"offset":2118},"end":{"line":59,"column":63,"offset":2133},"indent":[]}}],"position":{"start":{"line":59,"column":47,"offset":2117},"end":{"line":59,"column":64,"offset":2134},"indent":[]}},{"type":"text","value":" make your code more predictable.","position":{"start":{"line":59,"column":64,"offset":2134},"end":{"line":59,"column":97,"offset":2167},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":2071},"end":{"line":59,"column":98,"offset":2168},"indent":[]}}],"position":{"start":{"line":59,"column":1,"offset":2071},"end":{"line":59,"column":98,"offset":2168},"indent":[]}},{"type":"code","lang":null,"meta":null,"value":"isEmpty: boolean;\nisFetching: boolean;\nisRefetching: boolean;\nisSuccess: boolean;\nisError: boolean;","position":{"start":{"line":61,"column":1,"offset":2170},"end":{"line":67,"column":4,"offset":2277},"indent":[1,1,1,1,1,1]}},{"type":"code","lang":"jsx","meta":null,"value":"function User({message}) {\n    if(message.requestState.isFetching) {\n        return <Spinner />;\n    }\n    return <img src={message.resonse.user.avatar} />\n}\n","position":{"start":{"line":69,"column":1,"offset":2279},"end":{"line":77,"column":4,"offset":2448},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Methods","position":{"start":{"line":80,"column":4,"offset":2454},"end":{"line":80,"column":11,"offset":2461},"indent":[]}}],"position":{"start":{"line":80,"column":1,"offset":2451},"end":{"line":80,"column":11,"offset":2461},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"RequestState seems to have a lot of methods but in reality it is three methods duplicated for each\nof the five possible states of a request:  Empty, Fetching, Refetching, Success & Error.","position":{"start":{"line":81,"column":1,"offset":2462},"end":{"line":82,"column":89,"offset":2649},"indent":[1]}}],"position":{"start":{"line":81,"column":1,"offset":2462},"end":{"line":82,"column":89,"offset":2649},"indent":[1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".{state}Map()","position":{"start":{"line":84,"column":5,"offset":2655},"end":{"line":84,"column":18,"offset":2668},"indent":[]}}],"position":{"start":{"line":84,"column":1,"offset":2651},"end":{"line":84,"column":18,"offset":2668},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":85,"column":3,"offset":2671},"end":{"line":85,"column":8,"offset":2676},"indent":[]}}],"position":{"start":{"line":85,"column":1,"offset":2669},"end":{"line":85,"column":10,"offset":2678},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":85,"column":10,"offset":2678},"end":{"line":85,"column":11,"offset":2679},"indent":[]}},{"type":"inlineCode","value":"(mapper: A => B) => RequestState","position":{"start":{"line":85,"column":11,"offset":2679},"end":{"line":85,"column":45,"offset":2713},"indent":[]}},{"type":"text","value":"  ","position":{"start":{"line":85,"column":45,"offset":2713},"end":{"line":85,"column":47,"offset":2715},"indent":[]}}],"position":{"start":{"line":85,"column":1,"offset":2669},"end":{"line":85,"column":47,"offset":2715},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Map functions will call their mapper with the current value of the variant and update it with the \nresult. The useful part is that they will only call the functions that match the current state of\nthe variant. This means you can describe what should happen for all states of the request but \nonly action on the current state.","position":{"start":{"line":87,"column":1,"offset":2717},"end":{"line":90,"column":34,"offset":3042},"indent":[1,1,1]}}],"position":{"start":{"line":87,"column":1,"offset":2717},"end":{"line":90,"column":34,"offset":3042},"indent":[1,1,1]}},{"type":"code","lang":"jsx","meta":null,"value":"function User({message}) {\n    return message.requestState\n        .emptyMap(() => null)\n        .fetchingMap(() => <Spinner />)\n        .refetchingMap(() => <img src={mesage.get('avatar')} />)\n        .successMap(() => <img src={mesage.get('avatar')} />)\n        .errorMap(() => <Error error={message.requestError} />)\n        .value();\n}","position":{"start":{"line":93,"column":1,"offset":3045},"end":{"line":103,"column":4,"offset":3395},"indent":[1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".{state}FlatMap()","position":{"start":{"line":106,"column":5,"offset":3402},"end":{"line":106,"column":22,"offset":3419},"indent":[]}}],"position":{"start":{"line":106,"column":1,"offset":3398},"end":{"line":106,"column":22,"offset":3419},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":107,"column":3,"offset":3422},"end":{"line":107,"column":8,"offset":3427},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":3420},"end":{"line":107,"column":10,"offset":3429},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":107,"column":10,"offset":3429},"end":{"line":107,"column":11,"offset":3430},"indent":[]}},{"type":"inlineCode","value":"(mapper: (A) => RequestState<B>) => RequestState<B>","position":{"start":{"line":107,"column":11,"offset":3430},"end":{"line":107,"column":64,"offset":3483},"indent":[]}},{"type":"text","value":"  ","position":{"start":{"line":107,"column":64,"offset":3483},"end":{"line":107,"column":66,"offset":3485},"indent":[]}}],"position":{"start":{"line":107,"column":1,"offset":3420},"end":{"line":107,"column":66,"offset":3485},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"FlatMap is similar to Map except instead of your mapper returning a value that is stored inside the\ncurrent request state, your mapper returns a new RequestState. ","position":{"start":{"line":109,"column":1,"offset":3487},"end":{"line":110,"column":64,"offset":3650},"indent":[1]}},{"type":"emphasis","children":[{"type":"text","value":"This is useful if you want to \nreplace the state from a different source.","position":{"start":{"line":110,"column":65,"offset":3651},"end":{"line":111,"column":43,"offset":3724},"indent":[1]}}],"position":{"start":{"line":110,"column":64,"offset":3650},"end":{"line":111,"column":44,"offset":3725},"indent":[1]}}],"position":{"start":{"line":109,"column":1,"offset":3487},"end":{"line":111,"column":44,"offset":3725},"indent":[1,1]}},{"type":"code","lang":"jsx","meta":null,"value":"function validateData(data) {\n    if(data.hasErrors) {\n        return RequestState.error();\n    }\n    return RequestState.success();\n}\n\nreturn requestState\n    .successFlatMap(() => validateData(message.response))\n    .errorMap(() => 'Error!')\n    .successMap(() => 'Success.')\n    .value();","position":{"start":{"line":113,"column":1,"offset":3727},"end":{"line":126,"column":4,"offset":4029},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"paragraph","children":[{"type":"text","value":"With the above example we can wait until the response is a success until we validate a portion of\nthe data. But we can still maintain single purpose functions for how to render the data and how to\nrespond to an error.","position":{"start":{"line":127,"column":1,"offset":4030},"end":{"line":129,"column":21,"offset":4247},"indent":[1,1]}}],"position":{"start":{"line":127,"column":1,"offset":4030},"end":{"line":129,"column":21,"offset":4247},"indent":[1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".to{state}()","position":{"start":{"line":132,"column":5,"offset":4254},"end":{"line":132,"column":17,"offset":4266},"indent":[]}}],"position":{"start":{"line":132,"column":1,"offset":4250},"end":{"line":132,"column":17,"offset":4266},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":133,"column":3,"offset":4269},"end":{"line":133,"column":8,"offset":4274},"indent":[]}}],"position":{"start":{"line":133,"column":1,"offset":4267},"end":{"line":133,"column":10,"offset":4276},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":133,"column":10,"offset":4276},"end":{"line":133,"column":11,"offset":4277},"indent":[]}},{"type":"inlineCode","value":"() => RequestState","position":{"start":{"line":133,"column":11,"offset":4277},"end":{"line":133,"column":31,"offset":4297},"indent":[]}}],"position":{"start":{"line":133,"column":1,"offset":4267},"end":{"line":133,"column":31,"offset":4297},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Casts a request state to a different type.","position":{"start":{"line":135,"column":1,"offset":4299},"end":{"line":135,"column":43,"offset":4341},"indent":[]}}],"position":{"start":{"line":135,"column":1,"offset":4299},"end":{"line":135,"column":43,"offset":4341},"indent":[]}},{"type":"code","lang":"jsx","meta":null,"value":"RequestState.fetching('foo')\n    .toError()\n    .fetchingMap(() => 'bar')\n    .value() // foo","position":{"start":{"line":137,"column":1,"offset":4343},"end":{"line":142,"column":4,"offset":4447},"indent":[1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":".value()","position":{"start":{"line":145,"column":5,"offset":4454},"end":{"line":145,"column":13,"offset":4462},"indent":[]}}],"position":{"start":{"line":145,"column":1,"offset":4450},"end":{"line":145,"column":13,"offset":4462},"indent":[]}},{"type":"paragraph","children":[{"type":"strong","children":[{"type":"text","value":"type:","position":{"start":{"line":146,"column":3,"offset":4465},"end":{"line":146,"column":8,"offset":4470},"indent":[]}}],"position":{"start":{"line":146,"column":1,"offset":4463},"end":{"line":146,"column":10,"offset":4472},"indent":[]}},{"type":"text","value":" ","position":{"start":{"line":146,"column":10,"offset":4472},"end":{"line":146,"column":11,"offset":4473},"indent":[]}},{"type":"inlineCode","value":"() => *","position":{"start":{"line":146,"column":11,"offset":4473},"end":{"line":146,"column":20,"offset":4482},"indent":[]}},{"type":"text","value":"   ","position":{"start":{"line":146,"column":20,"offset":4482},"end":{"line":146,"column":23,"offset":4485},"indent":[]}}],"position":{"start":{"line":146,"column":1,"offset":4463},"end":{"line":146,"column":23,"offset":4485},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Returns either the current state of the variant.","position":{"start":{"line":148,"column":1,"offset":4487},"end":{"line":148,"column":49,"offset":4535},"indent":[]}}],"position":{"start":{"line":148,"column":1,"offset":4487},"end":{"line":148,"column":49,"offset":4535},"indent":[]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"Unit Functions","position":{"start":{"line":151,"column":5,"offset":4542},"end":{"line":151,"column":19,"offset":4556},"indent":[]}}],"position":{"start":{"line":151,"column":1,"offset":4538},"end":{"line":151,"column":19,"offset":4556},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"The request state class has static unit functions for creating requestStates in different forms.","position":{"start":{"line":152,"column":1,"offset":4557},"end":{"line":152,"column":97,"offset":4653},"indent":[]}}],"position":{"start":{"line":152,"column":1,"offset":4557},"end":{"line":152,"column":97,"offset":4653},"indent":[]}},{"type":"code","lang":"js","meta":null,"value":"import {RequestState} from 'react-enty';\n\nRequestState.empty();\nRequestState.fetching();\nRequestState.refetching();\nRequestState.success();\nRequestState.error();","position":{"start":{"line":154,"column":1,"offset":4655},"end":{"line":162,"column":4,"offset":4826},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":2,"children":[{"type":"text","value":"Examples","position":{"start":{"line":164,"column":4,"offset":4831},"end":{"line":164,"column":12,"offset":4839},"indent":[]}}],"position":{"start":{"line":164,"column":1,"offset":4828},"end":{"line":164,"column":12,"offset":4839},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Becuase the request state is a concrete data type, rather than just a series of booleans, it \nis very easy to abstract common loading situations away behind a function or a hoc.","position":{"start":{"line":165,"column":1,"offset":4840},"end":{"line":166,"column":84,"offset":5017},"indent":[1]}}],"position":{"start":{"line":165,"column":1,"offset":4840},"end":{"line":166,"column":84,"offset":5017},"indent":[1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"ApplyLoader","position":{"start":{"line":168,"column":5,"offset":5023},"end":{"line":168,"column":16,"offset":5034},"indent":[]}}],"position":{"start":{"line":168,"column":1,"offset":5019},"end":{"line":168,"column":16,"offset":5034},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"Writing all cases of a variant can become time consuming so we can abstract a common loading style \ninto an applyLoader function.","position":{"start":{"line":170,"column":1,"offset":5036},"end":{"line":171,"column":30,"offset":5165},"indent":[1]}}],"position":{"start":{"line":170,"column":1,"offset":5036},"end":{"line":171,"column":30,"offset":5165},"indent":[1]}},{"type":"code","lang":"jsx","meta":null,"value":"function applyLoader(message) {\n    const {requestError} = message;\n    const {response} = message;\n    const {requestState} = message;\n\n    return message.requestState\n        .fetchingMap(() => <Loader/>)\n        .refetchingMap(() => <Loader/>)\n        .errorMap(() => <Error error={requestError}/>)\n}\n\nfunction User({userMessage}) {\n    return applyLoader(userMessage)\n        .successMap(() => <img src={userMessage.get('avatar')} />)\n        .value();\n}","position":{"start":{"line":173,"column":1,"offset":5167},"end":{"line":190,"column":4,"offset":5636},"indent":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"Merging RequestStates","position":{"start":{"line":192,"column":5,"offset":5642},"end":{"line":192,"column":26,"offset":5663},"indent":[]}}],"position":{"start":{"line":192,"column":1,"offset":5638},"end":{"line":192,"column":26,"offset":5663},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"You can even use a reduce to combine multiple request states together.\nAt each iteration if the previous requestState is a success it will replace it with the next.\nThis means that all must be true for the final state to render.\nBut if any are fetching or errored we will still get the right state.","position":{"start":{"line":194,"column":1,"offset":5665},"end":{"line":197,"column":70,"offset":5963},"indent":[1,1,1]}}],"position":{"start":{"line":194,"column":1,"offset":5665},"end":{"line":197,"column":70,"offset":5963},"indent":[1,1,1]}},{"type":"code","lang":"jsx","meta":null,"value":"return this.props[config.messages]\n    .reduce((previous, next) => previous.successFlatMap(() => next))\n    .fetchingMap(() => <Loader/>)\n    .refetchingMap(() => <Loader/>)\n    .errorMap(() => <Error error={requestError}/>)\n    .successMap(() => <Component {...this.props} />)\n    .value();","position":{"start":{"line":199,"column":1,"offset":5965},"end":{"line":207,"column":4,"offset":6267},"indent":[1,1,1,1,1,1,1,1]}},{"type":"heading","depth":3,"children":[{"type":"text","value":"Any Success","position":{"start":{"line":209,"column":5,"offset":6273},"end":{"line":209,"column":16,"offset":6284},"indent":[]}}],"position":{"start":{"line":209,"column":1,"offset":6269},"end":{"line":209,"column":16,"offset":6284},"indent":[]}},{"type":"paragraph","children":[{"type":"text","value":"@TODO","position":{"start":{"line":211,"column":1,"offset":6286},"end":{"line":211,"column":6,"offset":6291},"indent":[]}}],"position":{"start":{"line":211,"column":1,"offset":6286},"end":{"line":211,"column":6,"offset":6291},"indent":[]}},{"type":"export","value":"export const _frontmatter = {\"title\":\"Request State\",\"group\":\"React Enty\"}","position":{"start":{"line":214,"column":1,"offset":6294},"end":{"line":214,"column":75,"offset":6368},"indent":[]}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":214,"column":75,"offset":6368}}},"scopeImports":["import React from 'react'"],"scopeIdentifiers":["React"],"body":"function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Request State\",\n  \"group\": \"React Enty\"\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, [\"components\"]);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"There are five distinct states to any data fetching request:\"), mdx(\"table\", null, mdx(\"thead\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"thead\"\n  }, mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"State\"), mdx(\"th\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Data\"))), mdx(\"tbody\", {\n    parentName: \"table\"\n  }, mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Empty\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Nothing has been requested\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Fetching\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Request is in process for the first time\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Refetching\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Request has already returned data but is in process for a second time\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Success\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Request has completed and returned requested data\")), mdx(\"tr\", {\n    parentName: \"tbody\"\n  }, mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Error\"), mdx(\"td\", _extends({\n    parentName: \"tr\"\n  }, {\n    \"align\": null\n  }), \"Request has failed and returned an error\")))), mdx(\"p\", null, \"RequestState is a variant that allows the user to render the different states of a request in a declarative manner. It's api gives you a clear way of handling each possible state and makes sure your app is never rendering an unpredicted state.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"class RequestState {\\n\\n    // Map\\n    emptyMap(mapper: RequestStateMapper) => RequestState\\n    fetchingMap(mapper: RequestStateMapper) => RequestState\\n    refetchingMap(mapper: RequestStateMapper) => RequestState\\n    successMap(mapper: RequestStateMapper) => RequestState\\n    errorMap(mapper: RequestStateMapper) => RequestState\\n        \\n    // FlatMap\\n    emptyFlatMap(mapper: RequestStateFlatMapper) => RequestState\\n    fetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\\n    refetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\\n    successFlatMap(mapper: RequestStateFlatMapper) => RequestState\\n    errorFlatMap(mapper: RequestStateFlatMapper) => RequestState\\n\\n    // Casting\\n    toEmpty() => RequestState\\n    toFetching() => RequestState\\n    toRefetching() => RequestState\\n    toSuccess() => RequestState\\n    toError() => RequestState\\n\\n    // States\\n    isEmpty: boolean;\\n    isFetching: boolean;\\n    isRefetching: boolean;\\n    isSuccess: boolean;\\n    isError: boolean;\\n\\n    value(defaultValue: *) => *\\n}\\n\")), mdx(\"h2\", null, \"Properties\"), mdx(\"h3\", null, \".is{State}\"), mdx(\"p\", null, \"State properties hold the raw booleans to describe the request state. \"), mdx(\"p\", null, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"They are easy to access but map functions or \", \"[LoadingBoundary]\", \" make your code more predictable.\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {}), \"isEmpty: boolean;\\nisFetching: boolean;\\nisRefetching: boolean;\\nisSuccess: boolean;\\nisError: boolean;\\n\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"function User({message}) {\\n    if(message.requestState.isFetching) {\\n        return <Spinner />;\\n    }\\n    return <img src={message.resonse.user.avatar} />\\n}\\n\\n\")), mdx(\"h2\", null, \"Methods\"), mdx(\"p\", null, \"RequestState seems to have a lot of methods but in reality it is three methods duplicated for each\\nof the five possible states of a request:  Empty, Fetching, Refetching, Success & Error.\"), mdx(\"h3\", null, \".{state}Map()\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(mapper: A => B) => RequestState\"), \"  \"), mdx(\"p\", null, \"Map functions will call their mapper with the current value of the variant and update it with the\\nresult. The useful part is that they will only call the functions that match the current state of\\nthe variant. This means you can describe what should happen for all states of the request but\\nonly action on the current state.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"function User({message}) {\\n    return message.requestState\\n        .emptyMap(() => null)\\n        .fetchingMap(() => <Spinner />)\\n        .refetchingMap(() => <img src={mesage.get('avatar')} />)\\n        .successMap(() => <img src={mesage.get('avatar')} />)\\n        .errorMap(() => <Error error={message.requestError} />)\\n        .value();\\n}\\n\")), mdx(\"h3\", null, \".{state}FlatMap()\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"(mapper: (A) => RequestState<B>) => RequestState<B>\"), \"  \"), mdx(\"p\", null, \"FlatMap is similar to Map except instead of your mapper returning a value that is stored inside the\\ncurrent request state, your mapper returns a new RequestState. \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"This is useful if you want to\\nreplace the state from a different source.\")), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"function validateData(data) {\\n    if(data.hasErrors) {\\n        return RequestState.error();\\n    }\\n    return RequestState.success();\\n}\\n\\nreturn requestState\\n    .successFlatMap(() => validateData(message.response))\\n    .errorMap(() => 'Error!')\\n    .successMap(() => 'Success.')\\n    .value();\\n\")), mdx(\"p\", null, \"With the above example we can wait until the response is a success until we validate a portion of\\nthe data. But we can still maintain single purpose functions for how to render the data and how to\\nrespond to an error.\"), mdx(\"h3\", null, \".to{state}()\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"() => RequestState\")), mdx(\"p\", null, \"Casts a request state to a different type.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"RequestState.fetching('foo')\\n    .toError()\\n    .fetchingMap(() => 'bar')\\n    .value() // foo\\n\")), mdx(\"h3\", null, \".value()\"), mdx(\"p\", null, mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"type:\"), \" \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"() => *\"), \"   \"), mdx(\"p\", null, \"Returns either the current state of the variant.\"), mdx(\"h3\", null, \"Unit Functions\"), mdx(\"p\", null, \"The request state class has static unit functions for creating requestStates in different forms.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-js\"\n  }), \"import {RequestState} from 'react-enty';\\n\\nRequestState.empty();\\nRequestState.fetching();\\nRequestState.refetching();\\nRequestState.success();\\nRequestState.error();\\n\")), mdx(\"h2\", null, \"Examples\"), mdx(\"p\", null, \"Becuase the request state is a concrete data type, rather than just a series of booleans, it\\nis very easy to abstract common loading situations away behind a function or a hoc.\"), mdx(\"h3\", null, \"ApplyLoader\"), mdx(\"p\", null, \"Writing all cases of a variant can become time consuming so we can abstract a common loading style\\ninto an applyLoader function.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"function applyLoader(message) {\\n    const {requestError} = message;\\n    const {response} = message;\\n    const {requestState} = message;\\n\\n    return message.requestState\\n        .fetchingMap(() => <Loader/>)\\n        .refetchingMap(() => <Loader/>)\\n        .errorMap(() => <Error error={requestError}/>)\\n}\\n\\nfunction User({userMessage}) {\\n    return applyLoader(userMessage)\\n        .successMap(() => <img src={userMessage.get('avatar')} />)\\n        .value();\\n}\\n\")), mdx(\"h3\", null, \"Merging RequestStates\"), mdx(\"p\", null, \"You can even use a reduce to combine multiple request states together.\\nAt each iteration if the previous requestState is a success it will replace it with the next.\\nThis means that all must be true for the final state to render.\\nBut if any are fetching or errored we will still get the right state.\"), mdx(\"pre\", null, mdx(\"code\", _extends({\n    parentName: \"pre\"\n  }, {\n    \"className\": \"language-jsx\"\n  }), \"return this.props[config.messages]\\n    .reduce((previous, next) => previous.successFlatMap(() => next))\\n    .fetchingMap(() => <Loader/>)\\n    .refetchingMap(() => <Loader/>)\\n    .errorMap(() => <Error error={requestError}/>)\\n    .successMap(() => <Component {...this.props} />)\\n    .value();\\n\")), mdx(\"h3\", null, \"Any Success\"), mdx(\"p\", null, \"@TODO\"));\n}\n;\nMDXContent.isMDXComponent = true;","rawMDXOutput":"/* @jsx mdx */\nimport { mdx } from '@mdx-js/react';\n/* @jsx mdx */\n\nexport const _frontmatter = {\n  \"title\": \"Request State\",\n  \"group\": \"React Enty\"\n};\nconst makeShortcode = name => function MDXDefaultShortcode(props) {\n  console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\")\n  return <div {...props}/>\n};\n\nconst layoutProps = {\n  _frontmatter\n};\nconst MDXLayout = \"wrapper\"\nexport default function MDXContent({\n  components,\n  ...props\n}) {\n  return <MDXLayout {...layoutProps} {...props} components={components} mdxType=\"MDXLayout\">\n    <p>{`There are five distinct states to any data fetching request:`}</p>\n    <table>\n      <thead parentName=\"table\">\n        <tr parentName=\"thead\">\n          <th parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`State`}</th>\n          <th parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Data`}</th>\n        </tr>\n      </thead>\n      <tbody parentName=\"table\">\n        <tr parentName=\"tbody\">\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Empty`}</td>\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Nothing has been requested`}</td>\n        </tr>\n        <tr parentName=\"tbody\">\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Fetching`}</td>\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Request is in process for the first time`}</td>\n        </tr>\n        <tr parentName=\"tbody\">\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Refetching`}</td>\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Request has already returned data but is in process for a second time`}</td>\n        </tr>\n        <tr parentName=\"tbody\">\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Success`}</td>\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Request has completed and returned requested data`}</td>\n        </tr>\n        <tr parentName=\"tbody\">\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Error`}</td>\n          <td parentName=\"tr\" {...{\n            \"align\": null\n          }}>{`Request has failed and returned an error`}</td>\n        </tr>\n      </tbody>\n    </table>\n    <p>{`RequestState is a variant that allows the user to render the different states of a request in a declarative manner. It's api gives you a clear way of handling each possible state and makes sure your app is never rendering an unpredicted state.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`class RequestState {\n\n    // Map\n    emptyMap(mapper: RequestStateMapper) => RequestState\n    fetchingMap(mapper: RequestStateMapper) => RequestState\n    refetchingMap(mapper: RequestStateMapper) => RequestState\n    successMap(mapper: RequestStateMapper) => RequestState\n    errorMap(mapper: RequestStateMapper) => RequestState\n        \n    // FlatMap\n    emptyFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    fetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    refetchingFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    successFlatMap(mapper: RequestStateFlatMapper) => RequestState\n    errorFlatMap(mapper: RequestStateFlatMapper) => RequestState\n\n    // Casting\n    toEmpty() => RequestState\n    toFetching() => RequestState\n    toRefetching() => RequestState\n    toSuccess() => RequestState\n    toError() => RequestState\n\n    // States\n    isEmpty: boolean;\n    isFetching: boolean;\n    isRefetching: boolean;\n    isSuccess: boolean;\n    isError: boolean;\n\n    value(defaultValue: *) => *\n}\n`}</code></pre>\n    <h2>{`Properties`}</h2>\n    <h3>{`.is{State}`}</h3>\n    <p>{`State properties hold the raw booleans to describe the request state. `}</p>\n    <p><em parentName=\"p\">{`They are easy to access but map functions or `}{`[LoadingBoundary]`}{` make your code more predictable.`}</em></p>\n    <pre><code parentName=\"pre\" {...{}}>{`isEmpty: boolean;\nisFetching: boolean;\nisRefetching: boolean;\nisSuccess: boolean;\nisError: boolean;\n`}</code></pre>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`function User({message}) {\n    if(message.requestState.isFetching) {\n        return <Spinner />;\n    }\n    return <img src={message.resonse.user.avatar} />\n}\n\n`}</code></pre>\n    <h2>{`Methods`}</h2>\n    <p>{`RequestState seems to have a lot of methods but in reality it is three methods duplicated for each\nof the five possible states of a request:  Empty, Fetching, Refetching, Success & Error.`}</p>\n    <h3>{`.{state}Map()`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(mapper: A => B) => RequestState`}</inlineCode>{`  `}</p>\n    <p>{`Map functions will call their mapper with the current value of the variant and update it with the\nresult. The useful part is that they will only call the functions that match the current state of\nthe variant. This means you can describe what should happen for all states of the request but\nonly action on the current state.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`function User({message}) {\n    return message.requestState\n        .emptyMap(() => null)\n        .fetchingMap(() => <Spinner />)\n        .refetchingMap(() => <img src={mesage.get('avatar')} />)\n        .successMap(() => <img src={mesage.get('avatar')} />)\n        .errorMap(() => <Error error={message.requestError} />)\n        .value();\n}\n`}</code></pre>\n    <h3>{`.{state}FlatMap()`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`(mapper: (A) => RequestState<B>) => RequestState<B>`}</inlineCode>{`  `}</p>\n    <p>{`FlatMap is similar to Map except instead of your mapper returning a value that is stored inside the\ncurrent request state, your mapper returns a new RequestState. `}<em parentName=\"p\">{`This is useful if you want to\nreplace the state from a different source.`}</em></p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`function validateData(data) {\n    if(data.hasErrors) {\n        return RequestState.error();\n    }\n    return RequestState.success();\n}\n\nreturn requestState\n    .successFlatMap(() => validateData(message.response))\n    .errorMap(() => 'Error!')\n    .successMap(() => 'Success.')\n    .value();\n`}</code></pre>\n    <p>{`With the above example we can wait until the response is a success until we validate a portion of\nthe data. But we can still maintain single purpose functions for how to render the data and how to\nrespond to an error.`}</p>\n    <h3>{`.to{state}()`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`() => RequestState`}</inlineCode></p>\n    <p>{`Casts a request state to a different type.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`RequestState.fetching('foo')\n    .toError()\n    .fetchingMap(() => 'bar')\n    .value() // foo\n`}</code></pre>\n    <h3>{`.value()`}</h3>\n    <p><strong parentName=\"p\">{`type:`}</strong>{` `}<inlineCode parentName=\"p\">{`() => *`}</inlineCode>{`   `}</p>\n    <p>{`Returns either the current state of the variant.`}</p>\n    <h3>{`Unit Functions`}</h3>\n    <p>{`The request state class has static unit functions for creating requestStates in different forms.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-js\"\n      }}>{`import {RequestState} from 'react-enty';\n\nRequestState.empty();\nRequestState.fetching();\nRequestState.refetching();\nRequestState.success();\nRequestState.error();\n`}</code></pre>\n    <h2>{`Examples`}</h2>\n    <p>{`Becuase the request state is a concrete data type, rather than just a series of booleans, it\nis very easy to abstract common loading situations away behind a function or a hoc.`}</p>\n    <h3>{`ApplyLoader`}</h3>\n    <p>{`Writing all cases of a variant can become time consuming so we can abstract a common loading style\ninto an applyLoader function.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`function applyLoader(message) {\n    const {requestError} = message;\n    const {response} = message;\n    const {requestState} = message;\n\n    return message.requestState\n        .fetchingMap(() => <Loader/>)\n        .refetchingMap(() => <Loader/>)\n        .errorMap(() => <Error error={requestError}/>)\n}\n\nfunction User({userMessage}) {\n    return applyLoader(userMessage)\n        .successMap(() => <img src={userMessage.get('avatar')} />)\n        .value();\n}\n`}</code></pre>\n    <h3>{`Merging RequestStates`}</h3>\n    <p>{`You can even use a reduce to combine multiple request states together.\nAt each iteration if the previous requestState is a success it will replace it with the next.\nThis means that all must be true for the final state to render.\nBut if any are fetching or errored we will still get the right state.`}</p>\n    <pre><code parentName=\"pre\" {...{\n        \"className\": \"language-jsx\"\n      }}>{`return this.props[config.messages]\n    .reduce((previous, next) => previous.successFlatMap(() => next))\n    .fetchingMap(() => <Loader/>)\n    .refetchingMap(() => <Loader/>)\n    .errorMap(() => <Error error={requestError}/>)\n    .successMap(() => <Component {...this.props} />)\n    .value();\n`}</code></pre>\n    <h3>{`Any Success`}</h3>\n    <p>{`@TODO`}</p>\n\n    </MDXLayout>;\n}\n\n;\nMDXContent.isMDXComponent = true;"}}