1
- import { Layout , LegacyCard , Page } from "@shopify/polaris" ;
1
+ import { Layout , Card , Text , Page } from "@shopify/polaris" ;
2
2
import { navigate } from "raviger" ;
3
3
4
4
const DevNotes = ( ) => {
@@ -11,84 +11,99 @@ const DevNotes = () => {
11
11
>
12
12
< Layout >
13
13
< Layout . Section >
14
- < LegacyCard title = "Notes" >
15
- < LegacyCard . Section title = "Creating Extensions" >
16
- < li >
17
- Run < code > npm run s:e:create</ code > to create an extension and{ " " }
18
- < code > npm run s:e:deploy</ code > to deploy said extension.
19
- </ li >
20
- < li >
21
- If you get a message around "Invalid React hooks called" while
22
- deploying your extension, first run < code > npm ls react</ code > { " " }
23
- and see if it throws any errors. If it doesn't, delete{ " " }
24
- < code > package-lock.json</ code > and < code > node_modules</ code > { " " }
25
- and run < code > npm install --force</ code > and the issue should
26
- be fixed. If you do get an error when you run{ " " }
27
- < code > npm ls react</ code > , override the dependency in the{ " " }
28
- < code > overrides</ code > area in < code > package.json</ code > or
29
- downgrade < code > React</ code > to < code > 17.x.x</ code > .
30
- </ li >
31
- </ LegacyCard . Section >
32
- < LegacyCard . Section title = "Creating GraphQL and REST Clients" >
33
- < li >
34
- Starting < code > Shopify API v6</ code > , client providers require
35
- an additional few lines of setup. To avoid that, there's a new
36
- provider available at{ " " }
37
- < strong >
38
- < code > @/apps/server/utils/client-provider.service.ts</ code >
39
- </ strong > { " " }
40
- </ li >
41
- < li >
42
- Import < code > ClientProvider</ code > and pass it the{ " " }
43
- < code > req</ code > and < code > res</ code > objects, along with an{ " " }
44
- < code > isOnline</ code > Boolean value for using online / offline
45
- tokens.
46
- </ li >
47
- < li >
48
- The{ " " }
49
- < strong >
50
- < code > ClientProvider</ code >
51
- </ strong > { " " }
52
- returns
53
- < code > client, shop and session</ code > as a single object, so
54
- you can destructure around your need.
55
- </ li >
56
- < li >
57
- Examples can be found in{ " " }
58
- < strong >
59
- < code > @/apps/server/apps/apps.controller.ts</ code >
60
- </ strong >
61
- </ li >
62
- </ LegacyCard . Section >
63
- < LegacyCard . Section title = "Opening Issues and Asking for Help" >
64
- < p >
65
- The idea behind creating the repo was to make it easier for
66
- you to get started with Shopify app dev and/or understand how
67
- to implement Auth, Webhooks, GDPR routes, etc. that come
68
- pre-setup with this repo, and is production ready. Before
69
- asking for help, please remember:
70
- </ p >
71
- < br />
72
- < li >
73
- The maintainers will help you with setting up the boilerplate
74
- and/or pointing you in the right direction. They are NOT
75
- someone you can demand to work on your app if you can't pay
76
- for their time.
77
- </ li >
78
- < li >
79
- If you're stuck understanding how to build on Shopify, please
80
- read docs and search the internet before asking for help.
81
- </ li >
82
- < li >
83
- < strong >
84
- It is OK to message the maintainers as long as you're being
85
- civil about it - we do open source because we enjoy working
86
- with engineers and building things. Please don't ruin it for
87
- us.
88
- </ strong >
89
- </ li >
90
- </ LegacyCard . Section >
91
- </ LegacyCard >
14
+ < Card >
15
+ < Layout >
16
+ < Layout . Section >
17
+ < Text variant = "headingSm" as = "h6" >
18
+ Creating Extensions
19
+ </ Text >
20
+ < li >
21
+ Run < code > npm run s:e:create</ code > to create an extension
22
+ and < code > npm run s:e:deploy</ code > to deploy said
23
+ extension.
24
+ </ li >
25
+ < li >
26
+ If you get a message around "Invalid React hooks called"
27
+ while deploying your extension, first run{ " " }
28
+ < code > npm ls react</ code > and see if it throws any errors.
29
+ If it doesn't, delete < code > package-lock.json</ code > and{ " " }
30
+ < code > node_modules</ code > and run{ " " }
31
+ < code > npm install --force</ code > and the issue should be
32
+ fixed. If you do get an error when you run{ " " }
33
+ < code > npm ls react</ code > , override the dependency in the{ " " }
34
+ < code > overrides</ code > area in < code > package.json</ code > or
35
+ downgrade < code > React</ code > to < code > 17.x.x</ code > .
36
+ </ li >
37
+ </ Layout . Section >
38
+ < Layout . Section >
39
+ < Text variant = "headingSm" as = "h6" >
40
+ Creating GraphQL and REST Clients
41
+ </ Text >
42
+ < li >
43
+ Starting < code > Shopify API v6</ code > , client providers
44
+ require an additional few lines of setup. To avoid that,
45
+ there's a new provider available at{ " " }
46
+ < strong >
47
+ < code >
48
+ @/apps/server/utils/client-provider.service.ts
49
+ </ code >
50
+ </ strong > { " " }
51
+ </ li >
52
+ < li >
53
+ Import < code > ClientProvider</ code > and pass it the{ " " }
54
+ < code > req</ code > and < code > res</ code > objects, along with an{ " " }
55
+ < code > isOnline</ code > Boolean value for using online /
56
+ offline tokens.
57
+ </ li >
58
+ < li >
59
+ The{ " " }
60
+ < strong >
61
+ < code > ClientProvider</ code >
62
+ </ strong > { " " }
63
+ returns
64
+ < code > client, shop and session</ code > as a single object, so
65
+ you can destructure around your need.
66
+ </ li >
67
+ < li >
68
+ Examples can be found in{ " " }
69
+ < strong >
70
+ < code > @/apps/server/apps/apps.controller.ts</ code >
71
+ </ strong >
72
+ </ li >
73
+ </ Layout . Section >
74
+ < Layout . Section >
75
+ < Text variant = "headingSm" as = "h6" >
76
+ Opening Issues and Asking for Help
77
+ </ Text >
78
+ < p >
79
+ The idea behind creating the repo was to make it easier for
80
+ you to get started with Shopify app dev and/or understand
81
+ how to implement Auth, Webhooks, GDPR routes, etc. that come
82
+ pre-setup with this repo, and is production ready. Before
83
+ asking for help, please remember:
84
+ </ p >
85
+ < li >
86
+ The maintainers will help you with setting up the
87
+ boilerplate and/or pointing you in the right direction. They
88
+ are NOT someone you can demand to work on your app if you
89
+ can't pay for their time.
90
+ </ li >
91
+ < li >
92
+ If you're stuck understanding how to build on Shopify,
93
+ please read docs and search the internet before asking for
94
+ help.
95
+ </ li >
96
+ < li >
97
+ < strong >
98
+ It is OK to message the maintainers as long as you're
99
+ being civil about it - we do open source because we enjoy
100
+ working with engineers and building things. Please don't
101
+ ruin it for us.
102
+ </ strong >
103
+ </ li >
104
+ </ Layout . Section >
105
+ </ Layout >
106
+ </ Card >
92
107
</ Layout . Section >
93
108
</ Layout >
94
109
</ Page >
0 commit comments