Admin links Examples using React and Node

pjv0580
Tourist
6 0 1

Trying to develop an app (react node and Polaris) and i wanted to add an Admin Link for the product details page. I have wired up the link but when the link hits my product create page i am unable to access the query string values. There is no example that i could find in the react node example. 

 

How can i access the query parameters from inside a React.Component?

Example is my Admin Link will create https://xxx.myshopify.com/admin/apps/contentApp/create?id=17231912345051&shop=xxx.myshopify.com. I a...

id = 17231912345051

shop =xxx.myshopify.com

Replies 2 (2)
achieveapplabs
Shopify Partner
512 39 85

Hi @pjv0580 ,

Try npm install query-string

import qs from 'query-string';

var params = qs.parse(this.props.location.search);

Best,

Achieve Team

Use Approovly to create and track order approvals | Looking for more Shopify apps? achieveapplabs.com/#apps
alifaiz1804
Shopify Partner
7 0 2

Hi, Same issue here. if you found any solution please share here