From e130103ad3148e5eded8e1666df024fb3e503b3d Mon Sep 17 00:00:00 2001 From: SheetJS Date: Mon, 23 Jan 2023 00:37:44 -0500 Subject: [PATCH] tutorial --- docz/docs/02-getting-started/02-example.mdx | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docz/docs/02-getting-started/02-example.mdx b/docz/docs/02-getting-started/02-example.mdx index 944b600..c448c07 100644 --- a/docz/docs/02-getting-started/02-example.mdx +++ b/docz/docs/02-getting-started/02-example.mdx @@ -13,7 +13,23 @@ The discussion focuses on the problem solving mindset. API details are covered in other parts of the documentation. The goal of this example is to generate a XLSX workbook of US President names -and birthdays. [Click here](#live-demo) to jump to the live demo. +and birthdays. [Click here](#live-demo) to jump to the live demo. The sequence +diagram below shows the process: + +```mermaid +sequenceDiagram + actor U as User + participant P as Page + participant A as API + U->>P: click button + P->>A: fetch data + A->>P: raw data + Note over P: process data + Note over P: make workbook + Note over P: setup download + P->>U: download workbook +``` + ## Acquire Data @@ -589,7 +605,7 @@ const make_workbook = async() => { const filename = RNFetchBlob.fs.dirs.DocumentDir + "/Presidents.xlsx"; await RNFetchBlob.fs.writeFile(filename, Array.from(buf), 'ascii'); - return file; + return filename; }; const App = () => (