Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hot reloading by making auto-generated route components es6 classes instead of functional components #532

Merged
merged 6 commits into from
Nov 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ test/**/public
.gatsby-context.js
.DS_Store
public/
node_modules/
2 changes: 1 addition & 1 deletion examples/image-gallery/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import path from 'path'
exports.createPages = ({ graphql }) => (
new Promise((resolve, reject) => {
const pages = []
const imagePage = path.resolve('templates/image-page.js')
const imagePage = path.resolve('pages/image-page.js')
graphql(`
{
allImages(first: 1000) {
Expand Down
1 change: 0 additions & 1 deletion examples/image-gallery/pages/image-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ImagePage extends React.Component {
}

render () {
console.log(this.props)
const {regular, retina, micro} = this.props.data.image
return (
<div>
Expand Down
5 changes: 2 additions & 3 deletions examples/image-gallery/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {rhythm} from 'utils/typography'
import Link from 'react-router/lib/Link'

const ImageIndex = (props) => {
console.log(props)
return (
<div>
{props.data.allImages.edges.map((edge) => {
Expand Down Expand Up @@ -40,12 +39,12 @@ query allImages {
edges {
node {
path
regular: image(width: 290) {
regular: image(height: 290, width: 387) {
src
height
width
}
retina: image(width: 580) {
retina: image(height: 580, width: 794) {
src
}
}
Expand Down
Loading