-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite pure function components as class based components to be able…
… to use livereload. This is a kind of paradigm regression but as I dont want to struggle for weeks with HMR, I prefer waiting to have someone more familiar with it have a look.
- Loading branch information
Showing
6 changed files
with
128 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
"jsx-quotes": [ | ||
"error", | ||
"prefer-double" | ||
] | ||
], | ||
"react/prefer-stateless-function": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
import React from 'react' | ||
import ReadTheDocs from './ReadTheDocs' | ||
|
||
const About = () => ( | ||
<div className="jumbotron"> | ||
<h1 className="display-3">About</h1> | ||
<p className="lead"> | ||
LeanJS is written by Romain Dorgueil, taking inspiration from the bazillion starter kits | ||
available out there. | ||
</p> | ||
<p className="lead"> | ||
«Same Same but Different.» | ||
</p> | ||
<p className="lead"> | ||
Leaner, mostly. | ||
</p> | ||
<p> | ||
<ReadTheDocs /> | ||
</p> | ||
</div> | ||
) | ||
class About extends React.Component { | ||
render () { | ||
return ( | ||
<div className="jumbotron"> | ||
<h1 className="display-3">About</h1> | ||
<p className="lead"> | ||
LeanJS is written by Romain Dorgueil, taking inspiration from the bazillion starter kits | ||
available out there. | ||
</p> | ||
<p className="lead"> | ||
«Same Same but Different.» | ||
</p> | ||
<p className="lead"> | ||
Leaner, mostly. | ||
</p> | ||
<p> | ||
<ReadTheDocs /> | ||
</p> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default About |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import React from 'react' | ||
import LoremColumn from './LoremColumn' | ||
|
||
const Lorem = () => ( | ||
<div className="row"> | ||
<LoremColumn className="col-lg-6" /> | ||
<LoremColumn className="col-lg-6" /> | ||
</div> | ||
) | ||
class Lorem extends React.Component { | ||
render () { | ||
return ( | ||
<div className="row"> | ||
<LoremColumn className="col-lg-6" /> | ||
<LoremColumn className="col-lg-6" /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default Lorem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,17 @@ | ||
import React from 'react' | ||
|
||
const ReadTheDocs = () => ( | ||
<a | ||
className="btn btn-lg btn-success" | ||
href="https://github.com/hartym/LeanJS/blob/master/README.rst" | ||
target="_blank" role="button" | ||
> | ||
<i className="fa fa-book" />{' '}Read the docs | ||
</a> | ||
) | ||
class ReadTheDocs extends React.Component { | ||
render () { | ||
return ( | ||
<a | ||
className="btn btn-lg btn-success" | ||
href="https://github.com/hartym/LeanJS/blob/master/README.rst" | ||
target="_blank" role="button" | ||
> | ||
<i className="fa fa-book" />{' '}Read the docs | ||
</a> | ||
); | ||
} | ||
} | ||
|
||
export default ReadTheDocs |