Unverified Commit fd55ef9a authored by TodorTotev's avatar TodorTotev Committed by GitHub

Remove redundant code from with-portals-ssr example (#13060)

* removed redundant imports and replaced the fragment with the shorthand syntax

* Brought back the component import
Co-authored-by: 's avatarJoe Haddad <joe.haddad@zeit.co>
parent a6a8ee53
import React from 'react'
import App from 'next/app'
import { prepareClientPortals } from '@jesstelford/react-portal-universal'
......
import * as React from 'react'
import { Component } from 'react'
import { UniversalPortal } from '@jesstelford/react-portal-universal'
export default class Index extends React.Component {
export default class Index extends Component {
constructor() {
super(...arguments)
this.state = { opened: true }
......@@ -17,7 +17,7 @@ export default class Index extends React.Component {
render() {
return (
<React.Fragment>
<>
{/* A portal that is adjacent to its target */}
<div id="target" />
<UniversalPortal selector="#target">
......@@ -65,7 +65,7 @@ export default class Index extends React.Component {
</div>
</UniversalPortal>
)}
</React.Fragment>
</>
)
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment