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

Example Code, posts Undefined #78

Closed
monico-moreno opened this issue Sep 18, 2018 · 4 comments
Closed

Example Code, posts Undefined #78

monico-moreno opened this issue Sep 18, 2018 · 4 comments

Comments

@monico-moreno
Copy link

Describe the bug
Unless the example code is not meant to be copy/pasted to work out of the box, the variable posts needs needs to be defined.

To Reproduce
Steps to reproduce the behavior:

  1. Go to example code
  2. copy and paste code into local env
  3. run code
  4. See error, "ReferenceError: posts is not defined"

Expected behavior
Code should run.

Actual behavior
Error from above.

Screenshots
none

Versions (please complete the following information):

  • NodeJS: v10.10
  • TypeScript: none
  • npm/yarn: v6.4.1
  • feed: n/a

Additional context
n/a

@monico-moreno
Copy link
Author

I suppose I could create a PR for this, but I wanted to get it down quickly. Please do let me know if you prefer a PR for this.

@jpmonette
Copy link
Owner

@monico-moreno Code is not meant to be copy/pasted straight, but maybe it should (or at least have a mention that it's not meant to be straight up copy/pasted). Developer must get his posts from database - you can look at the unit test as a demo.

What would you suggest as a PR?

@jpmonette
Copy link
Owner

Closing as no response.

@strefethen
Copy link

@jpmonette

I just started looking at this repo this afternoon (very nice btw), and I tripped on this too.

+1 for "Code is not meant to be copy/pasted. "posts" should be a list of items pulled from a data store from which to build your feed's items.

@monico-moreno Code is not meant to be copy/pasted straight, but maybe it should (or at least have a mention that it's not meant to be straight up copy/pasted). Developer must get his posts from database - you can look at the unit test as a demo.

What would you suggest as a PR?

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

No branches or pull requests

3 participants