How to use the @jaredpalmer/after.ensureReady function in @jaredpalmer/after

To help you get started, we’ve selected a few @jaredpalmer/after examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github charliewilco / downwrite / afterdown / src / client.js View on Github external
import React from 'react'
import { hydrate } from 'react-dom'
import { BrowserRouter as Router } from 'react-router-dom'
import { ensureReady, After } from '@jaredpalmer/after'
import './client.css'
import routes from './routes'

ensureReady(routes).then(data => {
  console.log(data)
  hydrate(
    
      
    ,
    document.getElementById('root')
  )
})

if (module.hot) {
  module.hot.accept()
}

@jaredpalmer/after

Build isomorphic Javascript applications with ease.

MIT
Latest version published 3 years ago

Package Health Score

57 / 100
Full package analysis

Similar packages