language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-env-from-next-config-js/pages/index.js
@@ -1,4 +1,4 @@ -export default () => { +export default function Home() { return ( <div> RESTURL_SPEAKERS {process.env.RESTURL_SPEAKERS}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-fela/pages/index.js
@@ -33,9 +33,11 @@ function Title({ children, size = 24 }) { return <h1 className={css({ fontSize: size, color: '#555' })}>{children}</h1> } -export default () => ( - <Container> - <Title size={50}>My Title</Title> - <Text>Hi, I am Fela.</Text> - </Container> -) +export default function Home() { + return...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/auth/initFirebase.js
@@ -8,7 +8,7 @@ const config = { projectId: process.env.FIREBASE_PROJECT_ID, } -export default () => { +export default function initFirebase() { if (!firebase.apps.length) { firebase.initializeApp(config) }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/auth/logout.js
@@ -2,7 +2,7 @@ import firebase from 'firebase/app' import 'firebase/auth' -export default async () => { +export default async function logout() { return firebase .auth() .signOut()
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/middleware/commonMiddleware.js
@@ -1,4 +1,6 @@ import cookieSession from './cookieSession' import cookieSessionRefresh from './cookieSessionRefresh' -export default (handler) => cookieSession(cookieSessionRefresh(handler)) +export default function commonMiddleware(handler) { + return cookieSession(cookieSessionRefresh(handler)) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/middleware/cookieSession.js
@@ -31,11 +31,13 @@ export const addSession = (req, res) => { includeSession(req, res, () => {}) } -export default (handler) => (req, res) => { - try { - addSession(req, res) - } catch (e) { - return res.status(500).json({ error: 'Could not get user session.' }) +export default function cookieSessionWrapp...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/middleware/cookieSessionRefresh.js
@@ -1,9 +1,11 @@ // Update a value in the cookie so that the set-cookie will be sent. // Only changes every minute so that it's not sent with every request. // https://github.com/expressjs/cookie-session#extending-the-session-expiration -export default (handler) => (req, res) => { - if (req.session) { - req.sess...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/pageWrappers/withAuthUser.js
@@ -9,7 +9,7 @@ import { createAuthUser, createAuthUserInfo } from '../auth/user' // Gets the authenticated user from the Firebase JS SDK, when client-side, // or from the request object, when server-side. Add the AuthUserInfo to // context. -export default (ComposedComponent) => { +export default function withAuthU...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-authentication/utils/pageWrappers/withAuthUserInfo.js
@@ -6,7 +6,7 @@ import { get } from 'lodash/object' import { AuthUserInfoContext } from '../auth/hooks' // Provides an AuthUserInfo prop to the composed component. -export default (ComposedComponent) => { +export default function withAuthUserInfo(ComposedComponent) { const WithAuthUserInfoComp = (props) => { ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-hosting/src/pages/about.jsx
@@ -1,8 +1,10 @@ import * as React from 'react' import App from '../components/App' -export default () => ( - <App> - <p>About Page</p> - </App> -) +export default function About() { + return ( + <App> + <p>About Page</p> + </App> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase-hosting/src/pages/index.jsx
@@ -1,8 +1,10 @@ import * as React from 'react' import App from '../components/App' -export default () => ( - <App> - <p>Index Page</p> - </App> -) +export default function Home() { + return ( + <App> + <p>Index Page</p> + </App> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase/context/userContext.js
@@ -3,7 +3,7 @@ import firebase from '../firebase/clientApp' export const UserContext = createContext() -export default ({ children }) => { +export default function UserContextComp({ children }) { const [user, setUser] = useState(null) const [loadingUser, setLoadingUser] = useState(true) // Helpful, to updat...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase/pages/_app.js
@@ -1,8 +1,10 @@ import UserProvider from '../context/userContext' // Custom App to wrap it with context provider -export default ({ Component, pageProps }) => ( - <UserProvider> - <Component {...pageProps} /> - </UserProvider> -) +export default function App({ Component, pageProps }) { + return ( + <UserP...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-firebase/pages/index.js
@@ -3,7 +3,7 @@ import { useEffect } from 'react' import { useUser } from '../context/userContext' import firebase from '../firebase/clientApp' -export default () => { +export default function Home() { // Our custom hook to get context values const { loadingUser, user } = useUser()
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-flow/components/Page.js
@@ -7,11 +7,16 @@ type Props = { title?: string, } -export default ({ children, title = 'This is the default title' }: Props) => ( - <section> - <Head> - <title>{title}</title> - </Head> - {children} - </section> -) +export default function Page({ + children, + title = 'This is the default title...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-flow/pages/about.js
@@ -2,8 +2,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page title="About us"> - <div>About us</div> - </Page> -) +export default function About() { + return ( + <Page title="About us"> + <div>About us</div> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-flow/pages/contact.js
@@ -2,8 +2,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page title="Contact us"> - <div>Contact</div> - </Page> -) +export default function Contact() { + return ( + <Page title="Contact us"> + <div>Contact</div> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-flow/pages/index.js
@@ -2,8 +2,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page> - <div>Hello World</div> - </Page> -) +export default function Home() { + return ( + <Page> + <div>Hello World</div> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-glamor/pages/index.js
@@ -8,4 +8,6 @@ if (typeof window !== 'undefined') { rehydrate(window.__NEXT_DATA__.ids) } -export default () => <h1 css={{ color: 'red', fontSize: 50 }}>My page</h1> +export default function Home() { + return <h1 css={{ color: 'red', fontSize: 50 }}>My page</h1> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/components/Header.js
@@ -1,26 +1,28 @@ import React from 'react' import Link from 'next/link' -export default () => ( - <header> - <nav> - <ul> - <li> - <Link href="/"> - <a>Home</a> - </Link> - </li> - <li> - <Link href="/about"> - <a>About</a> - <...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/components/Page.js
@@ -1,9 +1,11 @@ import React from 'react' import Header from './Header' -export default ({ children }) => ( - <div> - <Header /> - {children} - </div> -) +export default function Page({ children }) { + return ( + <div> + <Header /> + {children} + </div> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/components/amp/AmpAnalytics.js
@@ -2,18 +2,20 @@ import React from 'react' import AmpIncludeCustomElement from './AmpIncludeCustomElement' -export default (props) => ( - <> - <AmpIncludeCustomElement name="amp-analytics" version="0.1" /> - <amp-analytics type={props.type}> - {props.script && ( - <script - type="appli...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/components/amp/AmpIncludeCustomElement.js
@@ -1,19 +1,21 @@ import React from 'react' import Head from 'next/head' -export default (props) => ( - <Head> - <script - async - custom-element={props.name} - src={ - 'https://cdn.ampproject.org/v0/' + - props.name + - '-' + - props.version + - '.js' - } ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/pages/_document.js
@@ -11,7 +11,7 @@ function AmpWrap({ ampOnly, nonAmp }) { return !isAmp && nonAmp } -export default class extends Document { +export default class MyDocument extends Document { render() { return ( <html>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/pages/about.js
@@ -1,8 +1,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page> - <h1>This is the About page</h1> - </Page> -) +export default function About() { + return ( + <Page> + <h1>This is the About page</h1> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/pages/contact.js
@@ -3,7 +3,7 @@ import Page from '../components/Page' import * as gtag from '../lib/gtag' -export default class extends Component { +export default class Contact extends Component { state = { message: '' } handleInput = (e) => {
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics-amp/pages/index.js
@@ -1,8 +1,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page> - <h1>This is the Home page</h1> - </Page> -) +export default function Home() { + return ( + <Page> + <h1>This is the Home page</h1> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/components/Header.js
@@ -1,26 +1,28 @@ import React from 'react' import Link from 'next/link' -export default () => ( - <header> - <nav> - <ul> - <li> - <Link href="/"> - <a>Home</a> - </Link> - </li> - <li> - <Link href="/about"> - <a>About</a> - <...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/components/Page.js
@@ -1,9 +1,11 @@ import React from 'react' import Header from './Header' -export default ({ children }) => ( - <div> - <Header /> - {children} - </div> -) +export default function Page({ children }) { + return ( + <div> + <Header /> + {children} + </div> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/pages/_document.js
@@ -3,7 +3,7 @@ import Document, { Head, Main, NextScript } from 'next/document' import { GA_TRACKING_ID } from '../lib/gtag' -export default class extends Document { +export default class MyDocument extends Document { render() { return ( <html>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/pages/about.js
@@ -1,8 +1,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page> - <h1>This is the About page</h1> - </Page> -) +export default function About() { + return ( + <Page> + <h1>This is the About page</h1> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/pages/contact.js
@@ -3,7 +3,7 @@ import Page from '../components/Page' import * as gtag from '../lib/gtag' -export default class extends Component { +export default class Contact extends Component { state = { message: '' } handleInput = (e) => {
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-google-analytics/pages/index.js
@@ -1,8 +1,10 @@ import React from 'react' import Page from '../components/Page' -export default () => ( - <Page> - <h1>This is the Home page</h1> - </Page> -) +export default function Home() { + return ( + <Page> + <h1>This is the Home page</h1> + </Page> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-faunadb/components/Footer.js
@@ -8,172 +8,178 @@ import { footerColumnListURL, } from '../styles/footer.js' -export default (props) => ( - <footer className={footer.className}> - <div className={footerContent.className}> - <div - className={`${footerColumn.className} ${footerColumnFirst.className}`} - > - <a href=...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-faunadb/components/GuestbookEntry.js
@@ -12,68 +12,70 @@ import { guestbookEntryShareTwitterButtonLogo2, } from '../styles/guestbookentry' -export default (props) => ( - <> - <div className={guestbookEntry.className}> - <div className={guestbookEntryUserDetail.className}> - <div className={guestbookEntryUserDetailAvatar.className}> +...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-faunadb/components/GuestbookEntryDivider.js
@@ -1,18 +1,20 @@ -export default () => ( - <> - <hr /> - <style jsx>{` - hr { - display: block; - margin-left: auto; - margin-right: auto; - margin-bottom: 30px; - height: 1px; - width: 80%; - border-radius: 20px; - border-color: rgba(50, 63, 203); - ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-faunadb/components/Header.js
@@ -1,17 +1,19 @@ import { headerBanner, headerTitle } from '../styles/header' -export default (props) => ( - <> - <a href="https://fauna.com" target="_blank" rel="noopener noreferrer"> - <img - className={headerBanner.className} - src="/static/fauna-logo-blue.png" - height="35px" - ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-faunadb/components/Hero.js
@@ -18,7 +18,7 @@ function getEntries(data) { return data ? data.entries.data.reverse() : [] } -export default (props) => { +export default function Hero(props) { const { data, errorMessage } = useGuestbookEntries() const [entries, setEntries] = useState([]) const [twitterHandle, setTwitterHandle] = useS...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-hooks/components/app.js
@@ -1,42 +1,44 @@ -export default ({ children }) => ( - <main> - {children} - <style jsx global>{` - * { - font-family: Menlo, Monaco, 'Lucida Console', 'Liberation Mono', - 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', - monospace, serif; - } - body { - ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-hooks/components/error-message.js
@@ -1,13 +1,15 @@ -export default ({ message }) => ( - <aside> - {message} - <style jsx>{` - aside { - padding: 1.5em; - font-size: 14px; - color: white; - background-color: red; - } - `}</style> - </aside> -) +export default function ErrorMessage({ message }) { + retur...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-hooks/lib/with-graphql-client.js
@@ -3,7 +3,7 @@ import initGraphQL from './init-graphql' import Head from 'next/head' import { getInitialState } from 'graphql-hooks-ssr' -export default (App) => { +export default function withGraphqlClient(App) { return class GraphQLHooks extends React.Component { static displayName = 'GraphQLHooks(App)' ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-hooks/pages/about.js
@@ -1,30 +1,32 @@ import App from '../components/app' import Header from '../components/header' -export default () => ( - <App> - <Header /> - <article> - <h1>The Idea Behind This Example</h1> - <p> - <a href="https://github.com/nearform/graphql-hooks">GraphQL Hooks</a> is - a library...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-hooks/pages/index.js
@@ -2,9 +2,11 @@ import App from '../components/app' import Header from '../components/header' import PostList from '../components/post-list' -export default () => ( - <App> - <Header /> - <PostList /> - </App> -) +export default function Home() { + return ( + <App> + <Header /> + <PostList />...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-graphql-react/pages/index.js
@@ -1,6 +1,6 @@ import { useGraphQL } from 'graphql-react' -export default () => { +export default function Home() { const { loading, cacheValue: { data } = {} } = useGraphQL({ fetchOptionsOverride(options) { options.url = 'https://graphql-pokemon.now.sh'
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-grommet/pages/index.js
@@ -1,12 +1,14 @@ import React from 'react' import { Anchor, Box, Heading, Paragraph } from 'grommet' -export default () => ( - <Box align="center" margin="large"> - <Heading>Grommet is awesome!</Heading> - <Paragraph> - Find out more at{' '} - <Anchor href="https://v2.grommet.io/">https://v2.gromm...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-http2/pages/about.js
@@ -1,9 +1,11 @@ import Link from 'next/link' -export default () => ( - <div> - <h3>This is the /about page. </h3> - <Link href="/"> - <a> &larr; Back home</a> - </Link> - </div> -) +export default function About() { + return ( + <div> + <h3>This is the /about page. </h3> + <Link href="/"...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-http2/pages/index.js
@@ -1,9 +1,11 @@ import Link from 'next/link' -export default () => ( - <div> - <h3>Hello World.</h3> - <Link href="/about"> - <a>About</a> - </Link> - </div> -) +export default function Home() { + return ( + <div> + <h3>Hello World.</h3> + <Link href="/about"> + <a>About</a> + ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-iron-session/lib/fetchJson.js
@@ -1,6 +1,6 @@ import fetch from 'node-fetch' -export default async function (...args) { +export default async function fetcher(...args) { try { const response = await fetch(...args)
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-linaria/pages/index.js
@@ -21,7 +21,7 @@ const Box = styled.div` } ` -export default () => { +export default function Home() { return ( <React.Fragment> <Head>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-lingui/components/LangSwitcher.js
@@ -8,7 +8,7 @@ const availableLanguageNames = { } const availableLanguages = Object.keys(availableLanguageNames) -export default () => { +export default function LangSwitcher() { function onSubmit(evt) { evt.preventDefault() Router.push({
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-lingui/components/withLang.js
@@ -1,8 +1,8 @@ import React from 'react' import { I18nProvider } from '@lingui/react' -export default (Component, defaultLang = 'en') => - class WithLang extends React.Component { +export default function withLang(Component, defaultLang = 'en') { + return class WithLang extends React.Component { static asyn...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mdx/components/button.js
@@ -1,14 +1,16 @@ -export default ({ children }) => ( - <button - style={{ - borderRadius: '3px', - border: '1px solid black', - color: 'black', - padding: '0.5em 1em', - cursor: 'pointer', - fontSize: '1.1em', - }} - > - {children} - </button> -) +export default function Butto...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree-typescript/pages/index.tsx
@@ -1,5 +1,5 @@ import SampleComponent from '../components/SampleComponent' -export default () => { +export default function Home() { return <SampleComponent title="Index Page" linkTo="/other" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree-typescript/pages/other.tsx
@@ -1,5 +1,5 @@ import SampleComponent from '../components/SampleComponent' -export default () => { +export default function Other() { return <SampleComponent title={'Other Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree-typescript/pages/ssg.tsx
@@ -2,7 +2,7 @@ import { getSnapshot } from 'mobx-state-tree' import SampleComponent from '../components/SampleComponent' import { initializeStore } from '../store' -export default () => { +export default function Ssg() { return <SampleComponent title={'SSG Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree-typescript/pages/ssr.tsx
@@ -2,7 +2,7 @@ import { getSnapshot } from 'mobx-state-tree' import SampleComponent from '../components/SampleComponent' import { initializeStore } from '../store' -export default () => { +export default function Ssr() { return <SampleComponent title={'SSR Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree/components/Clock.js
@@ -1,4 +1,4 @@ -export default (props) => { +export default function Clock(props) { return ( <div className={props.light ? 'light' : ''}> {format(new Date(props.lastUpdate))}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree/pages/index.js
@@ -1,5 +1,5 @@ import SampleComponent from '../components/SampleComponent' -export default () => { +export default function Home() { return <SampleComponent title="Index Page" linkTo="/other" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree/pages/other.js
@@ -1,5 +1,5 @@ import SampleComponent from '../components/SampleComponent' -export default () => { +export default function Other() { return <SampleComponent title={'Other Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree/pages/ssg.js
@@ -2,7 +2,7 @@ import { getSnapshot } from 'mobx-state-tree' import SampleComponent from '../components/SampleComponent' import { initializeStore } from '../store' -export default () => { +export default function Ssg() { return <SampleComponent title={'SSG Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mobx-state-tree/pages/ssr.js
@@ -2,7 +2,7 @@ import { getSnapshot } from 'mobx-state-tree' import SampleComponent from '../components/SampleComponent' import { initializeStore } from '../store' -export default () => { +export default function Ssr() { return <SampleComponent title={'SSR Page'} linkTo="/" /> }
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-mocha/pages/index.js
@@ -1,10 +1,12 @@ -export default () => ( - <div> - <style jsx>{` - p { - color: red; - } - `}</style> - <p>Hello World!</p> - </div> -) +export default function Home() { + return ( + <div> + <style jsx>{` + p { + color: red; + } + `}</style> + <p>He...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-css/component/hello-world.js
@@ -1,7 +1,9 @@ import css from './hello-world.module.css' -export default () => ( - <div className={css.hello}> - Hello World, I am being styled using CSS Modules! - </div> -) +export default function HelloWorld() { + return ( + <div className={css.hello}> + Hello World, I am being styled using CSS Mo...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-css/pages/index.js
@@ -1,7 +1,9 @@ import HelloWorld from '../component/hello-world' -export default () => ( - <div className="example"> - <HelloWorld /> - </div> -) +export default function Home() { + return ( + <div className="example"> + <HelloWorld /> + </div> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-less/pages/index.js
@@ -1,9 +1,13 @@ // Without CSS Modules import '../style.less' -export default () => <div className="example">Hello Less!</div> +export default function Home() { + return <div className="example">Hello Less!</div> +} // With CSS Modules /* import style from '../style.less' -export default () => <div className={...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-offline/pages/index.js
@@ -1,3 +1,3 @@ -export default () => ( - <div>Next-Offline Example, try to install app via chrome</div> -) +export default function Home() { + return <div>Next-Offline Example, try to install app via chrome</div> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-sass/components/hello-world.js
@@ -1,7 +1,9 @@ import styles from './hello-world.module.scss' -export default () => ( - <div className={styles.hello}> - Hello World, I am being styled using SCSS Modules! - </div> -) +export default function HelloWorld() { + return ( + <div className={styles.hello}> + Hello World, I am being styled u...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-sass/pages/index.js
@@ -1,7 +1,9 @@ import HelloWorld from '../components/hello-world' -export default () => ( - <div className="app"> - <HelloWorld /> - </div> -) +export default function Home() { + return ( + <div className="app"> + <HelloWorld /> + </div> + ) +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-seo/pages/index.js
@@ -1,44 +1,46 @@ import { NextSeo } from 'next-seo' import Link from 'next/link' -export default () => ( - <div> - <NextSeo - config={{ - title: 'Page Meta Title', - description: 'This will be the page meta description', - canonical: 'https://www.canonicalurl.ie/', - openGraph:...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-next-seo/pages/jsonld.js
@@ -2,27 +2,29 @@ import { ArticleJsonLd } from 'next-seo' // See all available JSON-LD here: // https://github.com/garmeeh/next-seo#json-ld -export default () => ( - <div> - <ArticleJsonLd - url="https://example.com/article" - title="Article headline" - images={[ - 'https://example.com/ph...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-now-env/pages/index.js
@@ -1,21 +1,24 @@ -export default () => ( - <div className="hello"> - <p> - Hello World! Here's a secret shared with the client using Next env:{' '} - <strong>{process.env.SECRET}</strong>, the secret is shared at build time, - which means every reference to the secret is replaced with its value - ...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-orbit-components/pages/index.js
@@ -1,7 +1,7 @@ import React from 'react' import { Alert, Illustration } from '@kiwicom/orbit-components' -export default () => { +export default function Home() { return ( <React.Fragment> <Alert type="success" spaceAfter="large">
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-patternfly/pages/index.js
@@ -9,7 +9,7 @@ const steps = [ { name: 'Review', component: <p>Review Step</p>, nextButtonText: 'Finish' }, ] -export default () => { +export default function Home() { const [isOpen, setIsOpen] = useState(false) return ( <>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-polyfills/pages/index.js
@@ -1,3 +1,5 @@ console.log('Inside the /index.js page') -export default () => <div>Hello World</div> +export default function Home() { + return <div>Hello World</div> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-portals-ssr/pages/_document.js
@@ -1,7 +1,7 @@ import Document from 'next/document' import { ServerPortal } from '@jesstelford/react-portal-universal/server' -export default class extends Document { +export default class MyDocument extends Document { static async getInitialProps(ctx) { const portals = new ServerPortal() const origin...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-portals/pages/_document.js
@@ -1,6 +1,6 @@ import Document, { Head, Main, NextScript } from 'next/document' -export default class extends Document { +export default class MyDocument extends Document { render() { return ( <html>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-prefetching/pages/about.js
@@ -1 +1,3 @@ -export default () => <h1>This is the ABOUT page.</h1> +export default function About() { + return <h1>This is the ABOUT page.</h1> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-prefetching/pages/contact.js
@@ -1 +1,3 @@ -export default () => <h1>This is the CONTACT page.</h1> +export default function Contact() { + return <h1>This is the CONTACT page.</h1> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-prefetching/pages/features.js
@@ -1 +1,3 @@ -export default () => <h1>This is the FEATURES page.</h1> +export default function Features() { + return <h1>This is the FEATURES page.</h1> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-prefetching/pages/index.js
@@ -1 +1,3 @@ -export default () => <h1>This is the HOME page</h1> +export default function Home() { + return <h1>This is the HOME page</h1> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-quill-js/pages/index.js
@@ -46,6 +46,6 @@ const formats = [ 'video', ] -export default () => ( - <QuillNoSSRWrapper modules={modules} formats={formats} theme="snow" /> -) +export default function Home() { + return <QuillNoSSRWrapper modules={modules} formats={formats} theme="snow" /> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-ga/pages/about.js
@@ -1 +1,3 @@ -export default () => <div>About us</div> +export default function About() { + return <div>About us</div> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-ga/pages/index.js
@@ -1,10 +1,12 @@ import Link from 'next/link' -export default () => ( - <div> - Hello World.{' '} - <Link href="/about"> - <a>About</a> - </Link> - </div> -) +export default function Home() { + return ( + <div> + Hello World.{' '} + <Link href="/about"> + <a>About</a> + </L...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-helmet/pages/_document.js
@@ -1,7 +1,7 @@ import Document, { Head, Main, NextScript } from 'next/document' import { Helmet } from 'react-helmet' -export default class extends Document { +export default class MyDocument extends Document { static async getInitialProps(...args) { const documentProps = await super.getInitialProps(...arg...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-helmet/pages/index.js
@@ -1 +1,3 @@ -export default () => <div>Hello World!</div> +export default function Home() { + return <div>Hello World!</div> +}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-intl/components/Layout.js
@@ -9,7 +9,7 @@ const messages = defineMessages({ }, }) -export default ({ title, children }) => { +export default function Layout({ title, children }) { const intl = useIntl() return (
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-intl/components/Nav.js
@@ -1,31 +1,33 @@ import { FormattedMessage } from 'react-intl' import Link from 'next/link' -export default () => ( - <nav> - <li> - <Link href="/"> - <a> - <FormattedMessage id="nav.home" defaultMessage="Home" /> - </a> - </Link> - </li> - <li> - <Link href="/about"...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-intl/pages/about.js
@@ -2,7 +2,7 @@ import { FormattedRelativeTime } from 'react-intl' import { selectUnit } from '@formatjs/intl-utils' import Layout from '../components/Layout' -export default () => { +export default function About() { const { value, unit } = selectUnit(Date.now()) return ( <Layout>
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-intl/pages/index.js
@@ -14,7 +14,7 @@ const { description } = defineMessages({ }, }) -export default () => { +export default function Home() { const intl = useIntl() return (
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-md/pages/index.js
@@ -58,7 +58,7 @@ class NavigationLink extends PureComponent { } } -export default () => { +export default function Home() { const closeButton = ( <Button icon
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-native-web/pages/alternate.js
@@ -1,17 +1,19 @@ import * as React from 'react' import { StyleSheet, Text, View } from 'react-native' -export default () => ( - <View style={styles.container}> - <Text accessibilityRole="header" style={styles.text}> - Alternate Page - </Text> +export default function Alternate() { + return ( + <Vie...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-react-toolbox/pages/index.js
@@ -4,15 +4,17 @@ import Head from 'next/head' import Button from 'react-toolbox/lib/button/Button' -export default () => ( - <div> - <Head> - <link href="/theme.css" rel="stylesheet" /> - </Head> - <ThemeProvider theme={theme}> - <Button raised primary> - Hello - </Button> - </T...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-persist/components/clock.js
@@ -1,4 +1,4 @@ -export default ({ lastUpdate, light }) => { +export default function Clock({ lastUpdate, light }) { return ( <div className={light ? 'light' : ''}> {format(new Date(lastUpdate))}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-persist/lib/with-redux-store.js
@@ -17,7 +17,7 @@ function getOrCreateStore(initialState) { return window[__NEXT_REDUX_STORE__] } -export default (App) => { +export default function withReduxStore(App) { return class AppWithRedux extends Component { static async getInitialProps(appContext) { // Get or Create the store with `undef...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-thunk/lib/with-redux-store.js
@@ -16,7 +16,7 @@ function getOrCreateStore(initialState) { return window[__NEXT_REDUX_STORE__] } -export default (App) => { +export default function withReduxStore(App) { return class AppWithRedux extends Component { static async getInitialProps(appContext) { // Get or Create the store with `undef...
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-thunk/store.js
@@ -4,7 +4,7 @@ import thunkMiddleware from 'redux-thunk' import reducers from './reducers' // CREATING INITIAL STORE -export default (initialState) => { +export default function getStore(initialState) { const store = createStore( reducers, initialState,
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-wrapper/components/Clock.js
@@ -1,4 +1,4 @@ -export default ({ lastUpdate, light }) => { +export default function Clock({ lastUpdate, light }) { return ( <div className={light ? 'light' : ''}> {format(new Date(lastUpdate))}
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-wrapper/store/count/reducer.js
@@ -4,7 +4,7 @@ const countInitialState = { count: 0, } -export default (state = countInitialState, action) => { +export default function reducer(state = countInitialState, action) { switch (action.type) { case countActionTypes.ADD: return Object.assign({}, state, {
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-redux-wrapper/store/tick/reducer.js
@@ -5,7 +5,7 @@ const tickInitialState = { light: false, } -export default (state = tickInitialState, action) => { +export default function reducer(state = tickInitialState, action) { switch (action.type) { case tickActionTypes.TICK: return Object.assign({}, state, {
true
Other
vercel
next.js
dbad9db68c49f32603b42b2a0f1851abe454cfbf.json
Update Examples for Fast Refresh (#13068)
examples/with-relay-modern/lib/withData.js
@@ -2,7 +2,7 @@ import React from 'react' import initEnvironment from './createRelayEnvironment' import { fetchQuery, ReactRelayContext } from 'react-relay' -export default (ComposedComponent, options = {}) => { +export default function withData(ComposedComponent, options = {}) { return class WithData extends Re...
true