Creates a component, provider, and controls for handling conditions in a react app.
importcreateConditionalFallbackfrom'react-conditional-fallback';constoptionalInitialValue=false;const{ Provider, useCondition, set, clear, ConditionalFallback }=createConditionalFallback(optionalInitialValue);/**`Provider`canhoistthestatehigherintheapp,ifomitted,thestateexistsatthelevelofthe`ConditionalFallback`.*`useCondition`isahookthatreturnsthevalueofthecondition*`set`setstheconditionto`true`,notethisdoesnotneedtobeexecutedwithintheReactcontext.*`clear`setstheconditionto`false`,notethisdoesnotneedtobeexecutedwithintheReactcontext.*`ConditionalFallback`operatessimilarto`React.Suspense`exceptthatitrendersthefallbackwhentheconditionistrue(controlledvia`set`and`clear`).*/functionApp(){return(<ConditionalFallbackfallback={<UnhappyPath/>}><HappyPath/></ConditionalFallback>);}This README was generated by anansi.