examples/nutshell/src/index.js
async function loadQuote(store, quoteId) {
  const quote = await fetchQuote(quoteId)
  await store.update(state => {
    if (!state.quotes) {
      state.quotes = {}
    }
    state.quotes[quoteId] = quote
  })
  return { quoteId }
}
async function loadQuote(store, quoteId) {
  const quote = await fetchQuote(quoteId)
  await store.update(state => {
    if (!state.quotes) {
      state.quotes = {}
    }
    state.quotes[quoteId] = quote
  })
  return { quoteId }
}
async function loadQuote ( store , quoteId ) { const quote = await fetchQuote ( quoteId ) await store . update ( state => { if ( ! state . quotes ) { state . quotes = { } } state . quotes [ quoteId ] = quote } ) return { quoteId } }
define an action to load quote data
define an action to load quote data