Skip to content

Create Best Practices and FAQ.md closes #405#478

Closed
jessesquires wants to merge 8 commits intomasterfrom
initial-faq-guide
Closed

Create Best Practices and FAQ.md closes #405#478
jessesquires wants to merge 8 commits intomasterfrom
initial-faq-guide

Conversation

@jessesquires
Copy link
Copy Markdown
Contributor

Changes in this pull request

Initial best practices / FAQ. Closes #405.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

@jessesquires
Copy link
Copy Markdown
Contributor Author

Ok. I think I've got everything.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

Comment thread Guides/Best Practices and FAQ.md Outdated

- Make sure your [`-diffIdentifier`](https://instagram.github.io/IGListKit/Protocols/IGListDiffable.html#/c:objc(pl)IGListDiffable(im)diffIdentifier) implementation returns a **unique identifier** for each object.

- We highly recommend using single-item sections when possible. That is, each section only has 1 cell. Each section controller manages a single model and a single cell. This gives you the greatest amount of flexibility, modularity, and re-use for your components.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to recommend this? I think your point is not to use a single section controller w/ tons of variable items, right? We probably don't want to discourage multi-cell section controllers in general.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Right -- I'll remove, unless you have a suggestion on wording here

Comment thread Guides/Best Practices and FAQ.md Outdated

- Core Data ([#460](https://github.com/Instagram/IGListKit/issues/460), [#461](https://github.com/Instagram/IGListKit/issues/461))
- AsyncDisplayKit ([AsyncDisplayKit/#2942](https://github.com/facebook/AsyncDisplayKit/pull/2942))
- ComponentKit
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was looking for that 😄

- AsyncDisplayKit ([AsyncDisplayKit/#2942](https://github.com/facebook/AsyncDisplayKit/pull/2942))
- ComponentKit
- React Native
- Reactive Cocoa
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we add RxSwift?

Comment thread Guides/Best Practices and FAQ.md Outdated

**Does `IGListKit` work with `UITableView`?**

No, but you can install the [diffing subspec via CocoaPods]((https://instagram.github.io/IGListKit/installation.html)).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oops

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes


- Make sure your [`-diffIdentifier`](https://instagram.github.io/IGListKit/Protocols/IGListDiffable.html#/c:objc(pl)IGListDiffable(im)diffIdentifier) implementation returns a **unique identifier** for each object.

- We highly recommend using single-item sections when possible. That is, each section controller manages a single model (which may have one or multiple cells). This gives you the greatest amount of flexibility, modularity, and re-use for your components.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rnystrom - how's this?

@jessesquires
Copy link
Copy Markdown
Contributor Author

Updated.

Copy link
Copy Markdown
Contributor

@Sherlouk Sherlouk left a comment

Choose a reason for hiding this comment

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

Looks good to me!

May it be an idea to add a link to this in the issue template? "I have searched existing issues, and the FAQs and this is not a duplicate"

Random question but is isKindOfClass the same as doing (in Swift) if sectionController is DemoSectionController { ...

@jessesquires
Copy link
Copy Markdown
Contributor Author

@Sherlouk

May it be an idea to add a link to this in the issue template?

+1

Random question but is isKindOfClass the same as doing (in Swift) if sectionController is DemoSectionController { ...

Yep! We should probably add the Swift equivalent

Copy link
Copy Markdown
Contributor

@rnystrom rnystrom left a comment

Choose a reason for hiding this comment

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

@jessesquires thanks for doing this!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires updated the pull request - view changes

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@jessesquires has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@jessesquires jessesquires deleted the initial-faq-guide branch February 16, 2017 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants