Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Recursively resolve requests #3

Open
simenbrekken opened this issue Mar 3, 2017 · 0 comments
Open

Recursively resolve requests #3

simenbrekken opened this issue Mar 3, 2017 · 0 comments

Comments

@simenbrekken
Copy link
Contributor

simenbrekken commented Mar 3, 2017

import { resolveRequestPromises } from '@unfold/fetch-data'

const renderApplication = () => renderToString(<Application />)

try {
  const markup = await resolveFetchRequests(renderApplication, { maxIterations: 2 })

  res.send(markup)
} catch (error) {
  next(error)
}
@simenbrekken simenbrekken changed the title Recursively resolve dependencies Recursively resolve requests Mar 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant