Skip to content

Conversation

@acerbetti
Copy link

No description provided.

index.js Outdated
import PageData from './components/PageData';
import Paginator from './components/Paginator';

var {height, width} = Dimensions.get('window');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to const and style the curlies as { height, width } please?

index.js Outdated
this.state = {
currentPage: 0,
layout:{
height:height,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a space after the colon

index.js Outdated
};

updatePosition = (event) => {
const { contentOffset, layoutMeasurement } = event.nativeEvent;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like layoutMeasurement is no longer needed

@goshacmd
Copy link
Owner

Thanks for your PR! Please address the minor code styling issues I've pointed out

@acerbetti
Copy link
Author

I committed a change with your suggestions

@acerbetti
Copy link
Author

Did you see my code update ?

@goshacmd
Copy link
Owner

goshacmd commented Feb 3, 2017

Nice! Sorry, busy with my other projects at the moment. I run the code in a simulator this weekend to see if it works properly.

Copy link
Owner

@goshacmd goshacmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for contributing! Did you run this on iOS and/or Android?

Also, can you please fix these three minor code style issues and squash the commits? Looks good otherwise!

import PageData from './components/PageData';
import Paginator from './components/Paginator';

var { height, width } = Dimensions.get('window');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick: can you switch to const please?


this.state = {
currentPage: 0,
layout:{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Styling nitpick: please add a space after the colon :)

currentPage: 0,
layout:{
height: height,
width: width,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both of these can use the ES6 shorthand syntax:

layout: {
  height,
  width,
}

@goshacmd
Copy link
Owner

@acerbetti can you update the styling issues so we can move the PR forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants