How to use react-esi - 5 common examples

To help you get started, we’ve selected a few react-esi 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 zeit / next.js / examples / with-react-esi / src / pages / index.js View on Github external
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'

const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')

const Index = () => (
  <div>
    <h1>React ESI demo app</h1>
    <main>
      <p>Welcome to my news website!</p>
      
        <a>Go to an article</a>
      
    </main>

    {/* TODO: introduce a layout */}
    
    
  </div>
)
github zeit / next.js / examples / with-react-esi / src / pages / article.js View on Github external
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'

const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')

const Article = () =&gt; (
  <div>
    <h1>An article</h1>
    <main>This a specific article of the website!</main>

    {/* TODO: introduce a layout */}
    
    
    

    
      <a>Go back to the homepage</a>
    
  </div>
)
github zeit / next.js / examples / with-react-esi / src / pages / index.js View on Github external
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'

const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')

const Index = () =&gt; (
  <div>
    <h1>React ESI demo app</h1>
    <main>
      <p>Welcome to my news website!</p>
      
        <a>Go to an article</a>
      
    </main>

    {/* TODO: introduce a layout */}
    
    
  </div>
github zeit / next.js / examples / with-react-esi / src / pages / article.js View on Github external
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'

const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')

const Article = () =&gt; (
  <div>
    <h1>An article</h1>
    <main>This a specific article of the website!</main>

    {/* TODO: introduce a layout */}
    
    
    

    
      <a>Go back to the homepage</a>
    
  </div>
github zeit / next.js / examples / with-react-esi / src / pages / article.js View on Github external
import withESI from 'react-esi'
import React from 'react'
import Link from 'next/link'
import BreakingNews from '../components/BreakingNews'
import TopArticles from '../components/TopArticles'
import Weather from '../components/Weather'

const BreakingNewsESI = withESI(BreakingNews, 'BreakingNews')
const TopArticlesESI = withESI(TopArticles, 'TopArticles')
const WeatherESI = withESI(Weather, 'Weather')

const Article = () =&gt; (
  <div>
    <h1>An article</h1>
    <main>This a specific article of the website!</main>

    {/* TODO: introduce a layout */}
    
    
    

    
      <a>Go back to the homepage</a>
    </div>

react-esi

React ESI: Blazing-fast Server-Side Rendering for React and Next.js

MIT
Latest version published 3 years ago

Package Health Score

55 / 100
Full package analysis

Popular react-esi functions