Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Haakon Gunleiksrud
IT2819_h19_p2_haakon
Commits
ed67bb21
Commit
ed67bb21
authored
Sep 26, 2019
by
mirree
Browse files
Rewrote Header to a function
parent
12abace7
Changes
2
Hide whitespace changes
Inline
Side-by-side
prosjekt2/src/App.js
View file @
ed67bb21
import
React
from
'
react
'
;
import
MiddlePart
from
'
./components/MiddlePart
'
;
import
Header
from
'
./components/
h
eader
'
;
import
Header
from
'
./components/
H
eader
'
;
import
'
./App.css
'
;
function
App
()
{
...
...
prosjekt2/src/components/header.jsx
View file @
ed67bb21
import
React
,
{
Component
}
from
'
react
'
;
import
React
from
'
react
'
;
class
Header
extends
Component
{
render
()
{
return
(
<
div
className
=
"header"
id
=
"header"
ref
=
{
a
=>
this
.
_acc
=
a
}
>
Awesome art collections!
</
div
>
)
}
function
Header
(){
return
(
<
div
className
=
"header"
id
=
"header"
>
Awesome art collections!
</
div
>
)
}
export
default
Header
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment