hyperapp-starterkit icon indicating copy to clipboard operation
hyperapp-starterkit copied to clipboard

Hyper App Restaurant Course

Open ddpetty opened this issue 7 years ago • 2 comments

A student on your Discord channel came to me about an issue about the Header component not rendering in the browser. They said that they followed your tutorial and the syntax ended up causing errors. I have two fixes.

In the Header.js file:

import {h, app} from "hyperapp" 

export default function Header({state, actions}) {
  return (
    <header>
      <div class="logo">
         Logo
      </div>
    </header>
  )
}

and in the App.js file:

import { h, app } from "hyperapp"
import Header from './Header.js'

export default function App({state, actions}) {
  return (
    <div class={'app'}>
    <Header state={state} actions={actions}/>
    </div>
  )
}

ddpetty avatar Jul 01 '18 17:07 ddpetty

@ddpetty thanks

alanperez avatar Aug 10 '18 21:08 alanperez

You’re welcome! On Fri, Aug 10, 2018 at 5:35 PM Alan Perez [email protected] wrote:

@ddpetty https://github.com/ddpetty thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/codingphasedotcom/hyperapp-starterkit/issues/2#issuecomment-412212819, or mute the thread https://github.com/notifications/unsubscribe-auth/AYsNboW_4g4P9YAZPQtMcLzVITU7Q2pKks5uPfyQgaJpZM4U-aNB .

ddpetty avatar Aug 10 '18 22:08 ddpetty