1"use strict";(self.webpackChunkshake=self.webpackChunkshake||[]).push([[5711],{1470:(e,t,r)=>{r.d(t,{A:()=>k});var n=r(6540),a=r(4164),s=r(7559),u=r(3104),l=r(6347),o=r(205),i=r(7485),c=r(1682),d=r(679);function p(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:t,children:r}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return p(e).map(e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}})}(r);return function(e){const t=(0,c.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[t,r])}function g(e){let{value:t,tabValues:r}=e;return r.some(e=>e.value===t)}function f(e){let{queryString:t=!1,groupId:r}=e;const a=(0,l.W6)(),s=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,i.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})},[s,a])]}function m(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,s=h(e),[u,l]=(0,n.useState)(()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!g({value:t,tabValues:r}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find(e=>e.default)??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:s})),[i,c]=f({queryString:r,groupId:a}),[p,m]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,d.Dv)(r);return[a,(0,n.useCallback)(e=>{r&&s.set(e)},[r,s])]}({groupId:a}),b=(()=>{const e=i??p;return g({value:e,tabValues:s})?e:null})();(0,o.A)(()=>{b&&l(b)},[b]);return{selectedValue:u,selectValue:(0,n.useCallback)(e=>{if(!g({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),c(e),m(e)},[c,m,s]),tabValues:s}}var b=r(2303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=r(4848);function j(e){let{className:t,block:r,selectedValue:n,selectValue:s,tabValues:l}=e;const o=[],{blockElementScrollPositionUntilNextRender:i}=(0,u.a_)(),c=e=>{const t=e.currentTarget,r=o.indexOf(t),a=l[r].value;a!==n&&(i(t),s(a))},d=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=o.indexOf(e.currentTarget)+1;t=o[r]??o[0];break}case"ArrowLeft":{const r=o.indexOf(e.currentTarget)-1;t=o[r]??o[o.length-1];break}}t?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":r},t),children:l.map(e=>{let{value:t,label:r,attributes:s}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>{o.push(e)},onKeyDown:d,onClick:c,...s,className:(0,a.A)("tabs__item",v.tabItem,s?.className,{"tabs__item--active":n===t}),children:r??t},t)})})}function y(e){let{lazy:t,children:r,selectedValue:s}=e;const u=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=u.find(e=>e.props.value===s);return e?(0,n.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:u.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s}))})}function w(e){const t=m(e);return(0,x.jsxs)("div",{className:(0,a.A)(s.G.tabs.container,"tabs-container",v.tabList),
1children:[(0,x.jsx)(j,{...t,...e}),(0,x.jsx)(y,{...t,...e})]})}function k(e){const t=(0,b.A)();return(0,x.jsx)(w,{...e,children:p(e.children)},String(t))}},2864:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"react/users/unregister-user","title":"Unregister app user","description":"Unregistering an app user should be done when your app user decides to log out and use your app as a guest or when you no longer","source":"@site/docs/react/users/unregister-user.md","sourceDirName":"react/users","slug":"/react/users/unregister-user","permalink":"/docs/react/users/unregister-user","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"id":"unregister-user","title":"Unregister app user"},"sidebar":"reactSidebar","previous":{"title":"Chat","permalink":"/docs/react/users/chat"},"next":{"title":"Update app user metadata","permalink":"/docs/react/users/update-user-metadata"}}');var a=r(4848),s=r(8453),u=(r(6025),r(1470)),l=r(9365);const o={id:"unregister-user",title:"Unregister app user"},i=void 0,c={},d=[];function p(e){const t={blockquote:"blockquote",code:"code",em:"em",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.blockquote,{children:["\n",(0,a.jsxs)(t.p,{children:["Unregistering an app user should be done when your app user decides to ",(0,a.jsx)(t.em,{children:"log out"})," and use your app as a ",(0,a.jsx)(t.em,{children:"guest"})," or when you no longer\nwant the subsequent tickets to be associated with the current app user."]}),"\n"]}),"\n",(0,a.jsx)("p",{class:"p2 mt-40",children:(0,a.jsxs)(t.p,{children:["You're viewing the React Native docs. Other platforms \u2192 \xa0\n",(0,a.jsx)("a",{href:"/docs/ios/users/unregister-user",children:"iOS"}),"\xa0\n",(0,a.jsx)("a",{href:"/docs/android/users/unregister-user",children:"Android"}),"\xa0\n",(0,a.jsx)("a",{href:"/docs/flutter/users/unregister-user",children:"Flutter"}),"\xa0\n",(0,a.jsx)("a",{href:"/docs/web/users/unregister-user",children:"Web"}),"\xa0"]})}),"\n",(0,a.jsxs)(t.p,{children:["Unregistering is done by calling the ",(0,a.jsx)(t.code,{children:"Shake.unregisterUser"})," method:"]}),"\n",(0,a.jsxs)(u.A,{groupId:"react",defaultValue:"javascript",values:[{label:"Javascript",value:"javascript"},{label:"Typescript",value:"typescript"}],children:[(0,a.jsx)(l.A,{value:"javascript",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-javascript",metastring:'title="index.js"',children:"const logOut = (email) => {\n networkService.logOut(email,\n () => {\n // highlight-next-line\n Shake.unregisterUser();\n\n handleLogOut();\n },\n message => {\n // Handle failed log out\n });\n}\n"})})}),(0,a.jsx)(l.A,{value:"typescript",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-typescript",metastring:'title="index.ts"',children:"const logOut = (email: string) => {\n networkService.logOut(email,\n () => {\n // highlight-next-line\n Shake.unregisterUser();\n\n handleLogOut();\n },\n (message: string) => {\n // Handle failed log out\n });\n}\n"})})})]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},8453:(e,t,r)=>{r.d(t,{R:()=>u,x:()=>l});var n=r(6540);const a={},s=n.createContext(a);function u(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:u(e.components),n.createElement(s.Provider,{value:t},e.children)}},9365:(e,t,r)=>{r.d(t,{A:()=>u});r(6540);var n=r(4164);const a={tabItem:"tabItem_Ymn6"};var s=r(4848);function u(e){let{children:t,hidden:r,className:u}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,u),hidden:r,children:t})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.