How to FetchByKey from React?
App Development2 posts466 views1 likesLast activity Mar 2021
MA
ManishGroverOP
Mar 2021Hi,
Please help with the right way to fetch this contract by its key.
template MyTemplate
with
party1: Party
productId: Text
comment: Text
where
signatory party1
key (party1, productId):(Party, Text)
maintainer key._1
Many thanks. @palanisamyc @alex.graham
MA
ManishGrover
Mar 2021This works. Thank you @alex.graham
const key = { _1: "MyParty", _2: "MyString" };
const {contract, loading} = useFetchByKey(MyTemplate, () => key, []);