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

Official FAQ #1312

Closed
markerikson opened this Issue Jan 29, 2016 · 56 comments

Comments

8 participants
@markerikson
Contributor

markerikson commented Jan 29, 2016

I've noticed a LOT of FAQs appearing in Reactiflux, SO, the issues list, etc. Stuff like "sharing state between reducer branches", and "any good-sized Redux examples?", and so on. Is there a good place to create an FAQ list for Redux? Should there be a new page in the docs folder? Add a wiki to this repo? Create a separate repo? I can always go create my own FAQ repo, but figure it's probably worth coordinating with everyone else on this.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Jan 29, 2016

Collaborator

This would make a great top-level doc entry.
I'm happy to collaborate on this if you take the initiative and gather the common questions.

Collaborator

gaearon commented Jan 29, 2016

This would make a great top-level doc entry.
I'm happy to collaborate on this if you take the initiative and gather the common questions.

@gaearon gaearon added the docs label Jan 29, 2016

@pedrottimark

This comment has been minimized.

Show comment
Hide comment
@pedrottimark

pedrottimark Jan 30, 2016

Collaborator

Here is a resource which starts out a bit negative but has practical advice (for example, use that insight to improve your site’s content) and links to more.

http://alistapart.com/article/infrequently-asked-questions-of-faqs

Collaborator

pedrottimark commented Jan 30, 2016

Here is a resource which starts out a bit negative but has practical advice (for example, use that insight to improve your site’s content) and links to more.

http://alistapart.com/article/infrequently-asked-questions-of-faqs

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Jan 30, 2016

Contributor

@pedrottimark , thanks for the pointer.

Throwing together a scratch list of initial possible questions / topics as I skim through the issues list and SO questions:

  • Sharing state between reducers ("Reducer B needs to know state at key 'A')
  • Are there any larger real Redux projects?
  • Why should "type" be a string, or at least serializable?
  • Do I have to put all my state into Redux / should I ever use React's setState()?
  • Do I have to only connect my top-level component? (yes, React-Redux specific, but relevant)
  • Do I have to deep-copy my state? Isn't copying my state going to be slow?
  • Can I / should I create multiple stores?
  • Won't calling "all my reducers" for each action be slow?
  • Should I have 1-1 mappings between reducers and actions?
  • Do I have to use combineReducers?

Related "docs"-tagged issues and assorted discussions:

  • "Apps using Redux (#1078)
  • "Combining reducers recipe" (#1018)
  • "A call for quality articles" (#1014)

That's a quick first cut. @gaearon , you've obviously been answering a lot more questions about Redux for longer than anyone else. Any suggestions for topics you'd like to have some centralized answers covered?

Contributor

markerikson commented Jan 30, 2016

@pedrottimark , thanks for the pointer.

Throwing together a scratch list of initial possible questions / topics as I skim through the issues list and SO questions:

  • Sharing state between reducers ("Reducer B needs to know state at key 'A')
  • Are there any larger real Redux projects?
  • Why should "type" be a string, or at least serializable?
  • Do I have to put all my state into Redux / should I ever use React's setState()?
  • Do I have to only connect my top-level component? (yes, React-Redux specific, but relevant)
  • Do I have to deep-copy my state? Isn't copying my state going to be slow?
  • Can I / should I create multiple stores?
  • Won't calling "all my reducers" for each action be slow?
  • Should I have 1-1 mappings between reducers and actions?
  • Do I have to use combineReducers?

Related "docs"-tagged issues and assorted discussions:

  • "Apps using Redux (#1078)
  • "Combining reducers recipe" (#1018)
  • "A call for quality articles" (#1014)

That's a quick first cut. @gaearon , you've obviously been answering a lot more questions about Redux for longer than anyone else. Any suggestions for topics you'd like to have some centralized answers covered?

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Jan 30, 2016

Contributor

In general, a lot of questions seem to be about structuring reducers and areas of responsibility (Redux state vs component state, logic in actions vs logic in reducers). Also storing non-primitives/objects in the state. I know that the "combineReducers" doc page talks about structuring reducers, but perhaps there ought to be a more comprehensive page on that topic?

Contributor

markerikson commented Jan 30, 2016

In general, a lot of questions seem to be about structuring reducers and areas of responsibility (Redux state vs component state, logic in actions vs logic in reducers). Also storing non-primitives/objects in the state. I know that the "combineReducers" doc page talks about structuring reducers, but perhaps there ought to be a more comprehensive page on that topic?

@Dattaya

This comment has been minimized.

Show comment
Hide comment
@Dattaya

Dattaya Jan 31, 2016

Lots of questions are answered in the docs but I guess it's still good to have a short question--short answer section with links to articles/sections of the docs/discussions.
Few more possible Q&As (draft stage):

Structuring

  • My reducer is too big, how do I subdivide it (related to 'Should I have 1-1 mappings between reducers and actions?')
    • A reducer could be subdivided into subreducers with e.g. reduce-reducers. Subscribing to the same action in more than one reducer is also acceptable and could be used to split reducer into multiple pieces.
  • Where is the best place to keep my selectors?
    • The common practice it to keep them alongside the corresponding reducer.

Performance

  • My selector takes too much time to complete and is called on every update of a component; as a result my app performs poorly. How to solve this problem?

Other

Dattaya commented Jan 31, 2016

Lots of questions are answered in the docs but I guess it's still good to have a short question--short answer section with links to articles/sections of the docs/discussions.
Few more possible Q&As (draft stage):

Structuring

  • My reducer is too big, how do I subdivide it (related to 'Should I have 1-1 mappings between reducers and actions?')
    • A reducer could be subdivided into subreducers with e.g. reduce-reducers. Subscribing to the same action in more than one reducer is also acceptable and could be used to split reducer into multiple pieces.
  • Where is the best place to keep my selectors?
    • The common practice it to keep them alongside the corresponding reducer.

Performance

  • My selector takes too much time to complete and is called on every update of a component; as a result my app performs poorly. How to solve this problem?

Other

@Dattaya

This comment has been minimized.

Show comment
Hide comment
@Dattaya

Dattaya Jan 31, 2016

Some other things that we can transform into questions if necessary:

  • Dispatch multiple actions as one/receive multiple actions at once: redux-batched-updates, redux-batched-subscribe
  • Alternative to normalizr, lodash/keyBy, might be enough for simple projects if all we need is to transform an array returned from the server into a map id => item: products: keyBy(products, '_id')

Dattaya commented Jan 31, 2016

Some other things that we can transform into questions if necessary:

  • Dispatch multiple actions as one/receive multiple actions at once: redux-batched-updates, redux-batched-subscribe
  • Alternative to normalizr, lodash/keyBy, might be enough for simple projects if all we need is to transform an array returned from the server into a map id => item: products: keyBy(products, '_id')
@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Jan 31, 2016

Contributor

More ideas:

  • Can/should the store be referenced be importing it elsewhere in the app, for manually passing down to components and binding actions? Is there a good reason to keep from referencing it directly?
  • Size of the state / "giant objects" / memory usage
Contributor

markerikson commented Jan 31, 2016

More ideas:

  • Can/should the store be referenced be importing it elsewhere in the app, for manually passing down to components and binding actions? Is there a good reason to keep from referencing it directly?
  • Size of the state / "giant objects" / memory usage
@pci

This comment has been minimized.

Show comment
Hide comment
@pci

pci Feb 15, 2016

This is a great idea. Other points you might consider:

  • General guidelines on designing state structure
  • Not really a question, but it would be great to cover that a number of bigger redux projects put the complexity into the selectors, getting started this was something that tripped me up. I guess it comes under the heading of managing a larger project

I'm only just starting out with redux, but if I can be of any help putting these together, even if it's only answering "are these answers non-expert friendly", then I'll be happy to help.

pci commented Feb 15, 2016

This is a great idea. Other points you might consider:

  • General guidelines on designing state structure
  • Not really a question, but it would be great to cover that a number of bigger redux projects put the complexity into the selectors, getting started this was something that tripped me up. I guess it comes under the heading of managing a larger project

I'm only just starting out with redux, but if I can be of any help putting these together, even if it's only answering "are these answers non-expert friendly", then I'll be happy to help.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 15, 2016

Contributor

Thanks for the links. I'm hoping to have some time to throw together a first draft sometime this week.

Contributor

markerikson commented Feb 15, 2016

Thanks for the links. I'm hoping to have some time to throw together a first draft sometime this week.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 16, 2016

Contributor

Here's an initial draft outline for the FAQ page:

  • Reducers
    • How do I share state between two reducers?
    • Do I have to use combineReducers?
    • Do I have to use a switch statement to handle actions?
  • Organizing State
    • Do I have to put all my state into Redux? Should I ever use React's setState?
    • Can I put functions, promises, or other non-serializable items in my store state?
    • How do I organize nested/duplicate data in my state?
  • Store Setup
    • Can I / should I create multiple stores?
    • Is it OK to have more than one middleware chain in my store enhancer?
    • How do I subscribe to only a portion of the state?
  • Actions
    • Why should my action types be constants?
    • Why should "type" be a string, or at least serializable?
    • Should I have a 1-1 mapping between reducers and actions?
    • How can I represent "side effects" such as AJAX calls?
    • Should I dispatch multiple actions in a row from one action creator?
  • Code Structure
    • How should I group my actions and reducers in my project?
    • Where should my selectors go?
  • Performance
    • Won't calling "all my reducers" for each action be slow?
    • Do I have to deep-copy my state in a reducer? Isn't copying my state going to be slow?
    • How can I reduce the number of store update events?
    • Will having "one state tree" cause memory problems?
  • React-Redux
    • Why isn't my component re-rendering, or my mapStateToProps running?
    • Why is my component re-rendering too often?
    • How can I speed up my mapStateToProps?
  • Community
    • Are there any larger, "real" Redux projects?

The intent would be to give a reasonably short answer to each question, along with links to further reading. I would also want to write up a full page on structuring reducers, since that seems to be a topic worth a lot more detail.

Would appreciate suggestions, comments, critiques on this list.

Contributor

markerikson commented Feb 16, 2016

Here's an initial draft outline for the FAQ page:

  • Reducers
    • How do I share state between two reducers?
    • Do I have to use combineReducers?
    • Do I have to use a switch statement to handle actions?
  • Organizing State
    • Do I have to put all my state into Redux? Should I ever use React's setState?
    • Can I put functions, promises, or other non-serializable items in my store state?
    • How do I organize nested/duplicate data in my state?
  • Store Setup
    • Can I / should I create multiple stores?
    • Is it OK to have more than one middleware chain in my store enhancer?
    • How do I subscribe to only a portion of the state?
  • Actions
    • Why should my action types be constants?
    • Why should "type" be a string, or at least serializable?
    • Should I have a 1-1 mapping between reducers and actions?
    • How can I represent "side effects" such as AJAX calls?
    • Should I dispatch multiple actions in a row from one action creator?
  • Code Structure
    • How should I group my actions and reducers in my project?
    • Where should my selectors go?
  • Performance
    • Won't calling "all my reducers" for each action be slow?
    • Do I have to deep-copy my state in a reducer? Isn't copying my state going to be slow?
    • How can I reduce the number of store update events?
    • Will having "one state tree" cause memory problems?
  • React-Redux
    • Why isn't my component re-rendering, or my mapStateToProps running?
    • Why is my component re-rendering too often?
    • How can I speed up my mapStateToProps?
  • Community
    • Are there any larger, "real" Redux projects?

The intent would be to give a reasonably short answer to each question, along with links to further reading. I would also want to write up a full page on structuring reducers, since that seems to be a topic worth a lot more detail.

Would appreciate suggestions, comments, critiques on this list.

@sompylasar

This comment has been minimized.

Show comment
Hide comment
@sompylasar

sompylasar Feb 16, 2016

Wow awesome list 👍

Tiny note from me:

Actions
Why should "type" be a string, or at least serializable?

I think the whole action objects should be serializable, not just "type".

And there is one more question: if a middleware requires "name", not "type", what should I do? I have this in mind: https://github.com/gajus/redux-convention

sompylasar commented Feb 16, 2016

Wow awesome list 👍

Tiny note from me:

Actions
Why should "type" be a string, or at least serializable?

I think the whole action objects should be serializable, not just "type".

And there is one more question: if a middleware requires "name", not "type", what should I do? I have this in mind: https://github.com/gajus/redux-convention

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 16, 2016

Collaborator

Great stuff 👍

Collaborator

gaearon commented Feb 16, 2016

Great stuff 👍

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 17, 2016

Contributor

I will take a thumbs-up from @gaearon as the signal to go ahead :)
I'll start trying to put this together. Progress will be over at https://github.com/markerikson/redux/tree/create-faq-page .

Contributor

markerikson commented Feb 17, 2016

I will take a thumbs-up from @gaearon as the signal to go ahead :)
I'll start trying to put this together. Progress will be over at https://github.com/markerikson/redux/tree/create-faq-page .

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 17, 2016

Contributor

Okay, semi-related issue. Cloned my fork, npm install, npm run docs:prepare, Gitbook installed. Ran npm run docs:build, and got an error:

Template render error: (D:\Projects\redux\docs\basics\ExampleTodoList.md) [Line 143, Column 21]
  expected variable end (In file "docs/basics/ExampleTodoList.md")

Looking at it, it's a code sample that's doing inline styles, and thus has a style={{someObject}} chunk in it. Adding spaces between the curly braces fixed it. Also had the same error in UsageWithReact.md line 123. Fixing both of those allowed Gitbook to build the docs correctly.

Any particular reason why this hasn't noticed and fixed already by someone else? I'd expect it to actually have blocked major edits to the docs.

Contributor

markerikson commented Feb 17, 2016

Okay, semi-related issue. Cloned my fork, npm install, npm run docs:prepare, Gitbook installed. Ran npm run docs:build, and got an error:

Template render error: (D:\Projects\redux\docs\basics\ExampleTodoList.md) [Line 143, Column 21]
  expected variable end (In file "docs/basics/ExampleTodoList.md")

Looking at it, it's a code sample that's doing inline styles, and thus has a style={{someObject}} chunk in it. Adding spaces between the curly braces fixed it. Also had the same error in UsageWithReact.md line 123. Fixing both of those allowed Gitbook to build the docs correctly.

Any particular reason why this hasn't noticed and fixed already by someone else? I'd expect it to actually have blocked major edits to the docs.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 17, 2016

Contributor

Argh. Um. One more question: the CONTRIBUTING page says to use typography stuff like smart quotes. I'm trying to follow suit and do so, but the result isn't coming out well. The resulting HTML is coming out as everyone's favorite Unicode diamond question mark characters instead. I've tried copying and pasting the smart quote characters from CONTRIBUTING.md, typing them in manually (I'm on Windows, so ALT+0147/0148), etc. They actually seem to render okay over at http://jbt.github.io/markdown-editor , but not in Gitbook's output. Is there some trick I'm missing to this?

Contributor

markerikson commented Feb 17, 2016

Argh. Um. One more question: the CONTRIBUTING page says to use typography stuff like smart quotes. I'm trying to follow suit and do so, but the result isn't coming out well. The resulting HTML is coming out as everyone's favorite Unicode diamond question mark characters instead. I've tried copying and pasting the smart quote characters from CONTRIBUTING.md, typing them in manually (I'm on Windows, so ALT+0147/0148), etc. They actually seem to render okay over at http://jbt.github.io/markdown-editor , but not in Gitbook's output. Is there some trick I'm missing to this?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 17, 2016

Collaborator

Looking at it, it's a code sample that's doing inline styles, and thus has a style={{someObject}} chunk in it. Adding spaces between the curly braces fixed it. Also had the same error in UsageWithReact.md line 123. Fixing both of those allowed Gitbook to build the docs correctly.

Interesting. Maybe a regression in Gitbook?
I am using Gitbook 2.4.3 (specified in book.json). I have plugins resolved like this:

info: install plugin edit-link from npm (gitbook-plugin-edit-link) with version 1.4.2 
info: >> plugin edit-link installed with success 
info: No version specified, resolve plugin prism 
info: install plugin prism from npm (gitbook-plugin-prism) with version 1.0.0 
info: >> plugin prism installed with success 
info: No version specified, resolve plugin github 
info: install plugin github from npm (gitbook-plugin-github) with version 1.1.0 
info: >> plugin github installed with success 

Any particular reason why this hasn't noticed and fixed already by someone else? I'd expect it to actually have blocked major edits to the docs.

Can’t reproduce it.

The resulting HTML is coming out as everyone's favorite Unicode diamond question mark characters instead.

Do you have the same problem on the current docs website?

Collaborator

gaearon commented Feb 17, 2016

Looking at it, it's a code sample that's doing inline styles, and thus has a style={{someObject}} chunk in it. Adding spaces between the curly braces fixed it. Also had the same error in UsageWithReact.md line 123. Fixing both of those allowed Gitbook to build the docs correctly.

Interesting. Maybe a regression in Gitbook?
I am using Gitbook 2.4.3 (specified in book.json). I have plugins resolved like this:

info: install plugin edit-link from npm (gitbook-plugin-edit-link) with version 1.4.2 
info: >> plugin edit-link installed with success 
info: No version specified, resolve plugin prism 
info: install plugin prism from npm (gitbook-plugin-prism) with version 1.0.0 
info: >> plugin prism installed with success 
info: No version specified, resolve plugin github 
info: install plugin github from npm (gitbook-plugin-github) with version 1.1.0 
info: >> plugin github installed with success 

Any particular reason why this hasn't noticed and fixed already by someone else? I'd expect it to actually have blocked major edits to the docs.

Can’t reproduce it.

The resulting HTML is coming out as everyone's favorite Unicode diamond question mark characters instead.

Do you have the same problem on the current docs website?

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 17, 2016

Contributor

Yeah, NPM installed Gitbook 2.4.3 here as well.

Looking at redux.js.org, smart quotes render okay in my browser. Looking at the fresh build on my local box, smart quotes render okay in pages such as "Prior Art", but not in the FAQ page I was creating myself. Clearly there's something different about how I'm trying to use them.
I'll try this again tonight.

Contributor

markerikson commented Feb 17, 2016

Yeah, NPM installed Gitbook 2.4.3 here as well.

Looking at redux.js.org, smart quotes render okay in my browser. Looking at the fresh build on my local box, smart quotes render okay in pages such as "Prior Art", but not in the FAQ page I was creating myself. Clearly there's something different about how I'm trying to use them.
I'll try this again tonight.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 17, 2016

Collaborator

For now, just do as you find convenient (i.e. you can work on FAQ from Github interface, not use smart qoutes, etc). We’ll prettify before merging.

Collaborator

gaearon commented Feb 17, 2016

For now, just do as you find convenient (i.e. you can work on FAQ from Github interface, not use smart qoutes, etc). We’ll prettify before merging.

@Dattaya

This comment has been minimized.

Show comment
Hide comment
@Dattaya

Dattaya Feb 20, 2016

@markerikson this is a great list 👏

Actions
Why should "type" be a string, or at least serializable?

I think the whole action objects should be serializable, not just "type".

In the answer we might want to note that an action could be unserializable initially, but should be serializable eventually after it's gone through a middleware chain.

More questions to consider:

Dattaya commented Feb 20, 2016

@markerikson this is a great list 👏

Actions
Why should "type" be a string, or at least serializable?

I think the whole action objects should be serializable, not just "type".

In the answer we might want to note that an action could be unserializable initially, but should be serializable eventually after it's gone through a middleware chain.

More questions to consider:

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 21, 2016

Contributor

Got my initial progress over at https://github.com/markerikson/redux/blob/create-faq-page/docs/FAQ.md . Actual feedback on the content so far would be appreciated :)

@Dattaya : yeah, a couple of items on middleware might be useful also. As for the reducers, that stuff would go into the "Structuring Reducers" page I'm hoping to add as part of this rather than directly into the FAQ list itself.

Contributor

markerikson commented Feb 21, 2016

Got my initial progress over at https://github.com/markerikson/redux/blob/create-faq-page/docs/FAQ.md . Actual feedback on the content so far would be appreciated :)

@Dattaya : yeah, a couple of items on middleware might be useful also. As for the reducers, that stuff would go into the "Structuring Reducers" page I'm hoping to add as part of this rather than directly into the FAQ list itself.

@gaearon gaearon changed the title from FAQ location? to Official FAQ Feb 21, 2016

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 25, 2016

Contributor

Been busy the last couple nights, so the pace has slowed down to one or two answers written up per evening. But, making progress - 11 questions down, 14 to go at the moment.

Contributor

markerikson commented Feb 25, 2016

Been busy the last couple nights, so the pace has slowed down to one or two answers written up per evening. But, making progress - 11 questions down, 14 to go at the moment.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon
Collaborator

gaearon commented Feb 26, 2016

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 26, 2016

Contributor

@gaearon , I'd kinda skimmed past your "action in timeout" and "multiple dispatch" answers previously, but just had a chance to look at them again. No kidding, those deserve to be a new docs page right there.

Contributor

markerikson commented Feb 26, 2016

@gaearon , I'd kinda skimmed past your "action in timeout" and "multiple dispatch" answers previously, but just had a chance to look at them again. No kidding, those deserve to be a new docs page right there.

@kennetpostigo

This comment has been minimized.

Show comment
Hide comment
@kennetpostigo

kennetpostigo Feb 26, 2016

Just bringing it up because I see it asked alot and this is a FAQ 😅

kennetpostigo commented Feb 26, 2016

Just bringing it up because I see it asked alot and this is a FAQ 😅

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 26, 2016

Collaborator

Just bringing it up because I see it asked alot and this is a FAQ 😅

Agreed.
Here’s a good article: https://auth0.com/blog/2016/01/04/secure-your-react-and-redux-app-with-jwt-authentication/

Collaborator

gaearon commented Feb 26, 2016

Just bringing it up because I see it asked alot and this is a FAQ 😅

Agreed.
Here’s a good article: https://auth0.com/blog/2016/01/04/secure-your-react-and-redux-app-with-jwt-authentication/

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 26, 2016

Contributor

Sure, valid point, and I have asked for feedback :) I'm not entirely against putting that into the FAQ, but at the moment I would say it's less of a priority because it's not concerned with core Redux behavior. It's also a topic I'm not nearly as familiar with myself. If you or someone else had time to write it up, though, I'd totally take it as a PR against the branch I'm working on in my fork.

Contributor

markerikson commented Feb 26, 2016

Sure, valid point, and I have asked for feedback :) I'm not entirely against putting that into the FAQ, but at the moment I would say it's less of a priority because it's not concerned with core Redux behavior. It's also a topic I'm not nearly as familiar with myself. If you or someone else had time to write it up, though, I'd totally take it as a PR against the branch I'm working on in my fork.

@kennetpostigo

This comment has been minimized.

Show comment
Hide comment
@kennetpostigo

kennetpostigo Feb 26, 2016

I would love to help out and do that. Can you make the initial FAQ so I can structure what I put so that it matches with what you are going to write up?

kennetpostigo commented Feb 26, 2016

I would love to help out and do that. Can you make the initial FAQ so I can structure what I put so that it matches with what you are going to write up?

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 26, 2016

Contributor

Yep. Re-pasting the link, the current WIP is at https://github.com/markerikson/redux/blob/create-faq-page/docs/FAQ.md . Basic format is a couple paragraphs explaining the answer in general, followed by 3-4 links to relevant Redux docs, issues, SO questions, or other relevant articles.

Contributor

markerikson commented Feb 26, 2016

Yep. Re-pasting the link, the current WIP is at https://github.com/markerikson/redux/blob/create-faq-page/docs/FAQ.md . Basic format is a couple paragraphs explaining the answer in general, followed by 3-4 links to relevant Redux docs, issues, SO questions, or other relevant articles.

@kennetpostigo

This comment has been minimized.

Show comment
Hide comment
@kennetpostigo

kennetpostigo Feb 26, 2016

Okay I'll get to it.

kennetpostigo commented Feb 26, 2016

Okay I'll get to it.

@kennetpostigo

This comment has been minimized.

Show comment
Hide comment
@kennetpostigo

kennetpostigo Feb 26, 2016

@markerikson Made some changes you should have received a notification.

kennetpostigo commented Feb 26, 2016

@markerikson Made some changes you should have received a notification.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 27, 2016

Collaborator

Difference between Backbone and Redux: https://news.ycombinator.com/item?id=11187727

Collaborator

gaearon commented Feb 27, 2016

Difference between Backbone and Redux: https://news.ycombinator.com/item?id=11187727

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 27, 2016

Contributor

Yeah, could maybe toss that in along with a "When should I use Redux?" question.

Doing some traveling tomorrow. Will see if I can crank out a few more answers during the trip.

Contributor

markerikson commented Feb 27, 2016

Yeah, could maybe toss that in along with a "When should I use Redux?" question.

Doing some traveling tomorrow. Will see if I can crank out a few more answers during the trip.

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 27, 2016

Collaborator

Doing some traveling tomorrow.

I read that as “doing some time traveling tomorrow”. 😂

Collaborator

gaearon commented Feb 27, 2016

Doing some traveling tomorrow.

I read that as “doing some time traveling tomorrow”. 😂

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Feb 27, 2016

Contributor

Well, given that I'm crossing a couple time zones, that's not entirely inaccurate... :)

Contributor

markerikson commented Feb 27, 2016

Well, given that I'm crossing a couple time zones, that's not entirely inaccurate... :)

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Feb 27, 2016

Collaborator

This is probably already in the FAQ but I wrote again about combineReducers(): http://stackoverflow.com/a/35674297/458193

Collaborator

gaearon commented Feb 27, 2016

This is probably already in the FAQ but I wrote again about combineReducers(): http://stackoverflow.com/a/35674297/458193

@gaearon

This comment has been minimized.

Show comment
Hide comment
Collaborator

gaearon commented Feb 27, 2016

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 3, 2016

Contributor

Still cranking away on this. Got to 14 of 26 questions answered as of this evening, but then added two more to be answered ("When should I use Redux?" and "How many components should I connect?").

If anyone else would like to chip in, PRs still totally welcome :)

Contributor

markerikson commented Mar 3, 2016

Still cranking away on this. Got to 14 of 26 questions answered as of this evening, but then added two more to be answered ("When should I use Redux?" and "How many components should I connect?").

If anyone else would like to chip in, PRs still totally welcome :)

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 6, 2016

Contributor

Getting there. Spent most of the day on this, and I'm up to 23 of 29 questions complete. Might actually get the initial writeup completed within the next day or two.

Contributor

markerikson commented Mar 6, 2016

Getting there. Spent most of the day on this, and I'm up to 23 of 29 questions complete. Might actually get the initial writeup completed within the next day or two.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 7, 2016

Contributor

And there we go - all current 29 questions in the outline have answers written up.

Can I get some feedback on the current writeup before I submit a PR?

Contributor

markerikson commented Mar 7, 2016

And there we go - all current 29 questions in the outline have answers written up.

Can I get some feedback on the current writeup before I submit a PR?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 7, 2016

Collaborator

PR is an easier way to get feedback 😉
Great job.

Collaborator

gaearon commented Mar 7, 2016

PR is an easier way to get feedback 😉
Great job.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 7, 2016

Contributor

Sure. In the interest of keeping the history a bit cleaner, I'll try creating a second branch that has the content, but only one commit (unless you'd rather I just submit the PR as-is)

Contributor

markerikson commented Mar 7, 2016

Sure. In the interest of keeping the history a bit cleaner, I'll try creating a second branch that has the content, but only one commit (unless you'd rather I just submit the PR as-is)

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Mar 7, 2016

Collaborator

No big deal about it, do anyhow you like. We barely make any source changes at this point so we don’t care much about clean history.

Collaborator

gaearon commented Mar 7, 2016

No big deal about it, do anyhow you like. We barely make any source changes at this point so we don’t care much about clean history.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 7, 2016

Contributor

Heh. Well, it's up - #1489.

Contributor

markerikson commented Mar 7, 2016

Heh. Well, it's up - #1489.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 7, 2016

Contributor

Related observation: it'd be nice to be able to link directly to certain questions once this is published in the docs. I know you can link to headings in Github Markdown, and Github provides those nice on-hover anchor icons to be able to copy the relative links. I see that Gitbook does add ID tags to headers, such as "#is-there-always-a-1-1-mapping-between-reducers-and-actions", but there's no easy way to copy that. Would adding something like https://github.com/rlmv/gitbook-plugin-anchors to Redux's Gitbook setup be a good idea?

Contributor

markerikson commented Mar 7, 2016

Related observation: it'd be nice to be able to link directly to certain questions once this is published in the docs. I know you can link to headings in Github Markdown, and Github provides those nice on-hover anchor icons to be able to copy the relative links. I see that Gitbook does add ID tags to headers, such as "#is-there-always-a-1-1-mapping-between-reducers-and-actions", but there's no easy way to copy that. Would adding something like https://github.com/rlmv/gitbook-plugin-anchors to Redux's Gitbook setup be a good idea?

@mkozhukharenko

This comment has been minimized.

Show comment
Hide comment
@mkozhukharenko

mkozhukharenko Mar 26, 2016

@markerikson, you are doing a great job! I've found a lot of answers and useful links in your FAQ.

mkozhukharenko commented Mar 26, 2016

@markerikson, you are doing a great job! I've found a lot of answers and useful links in your FAQ.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Mar 28, 2016

Contributor

So. The core FAQ page is finally published. Per my last comment, it'd be nice if we could get easily-copyable anchors or shortcuts or something. Also up for discussion of further edits and improvements, like adding a ToC or splitting it up into sub-pages.

Thoughts/suggestions?

Contributor

markerikson commented Mar 28, 2016

So. The core FAQ page is finally published. Per my last comment, it'd be nice if we could get easily-copyable anchors or shortcuts or something. Also up for discussion of further edits and improvements, like adding a ToC or splitting it up into sub-pages.

Thoughts/suggestions?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 2, 2016

Collaborator

The FAQ is great. I think I already see less people asking the same questions. Let’s keep it up as it is for a while. You’re a collaborator so you should be able to reorganize it freely as you see fit. I made some minor stylistic edits in #1567 so if you can maintain those while changing things, it would be rad, but if not, not a big deal 😄 . I very much appreciate your work on this!

Collaborator

gaearon commented Apr 2, 2016

The FAQ is great. I think I already see less people asking the same questions. Let’s keep it up as it is for a while. You’re a collaborator so you should be able to reorganize it freely as you see fit. I made some minor stylistic edits in #1567 so if you can maintain those while changing things, it would be rad, but if not, not a big deal 😄 . I very much appreciate your work on this!

@gaearon gaearon closed this Apr 2, 2016

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Apr 2, 2016

Contributor

Sure. I'm putting together a Table of Contents right now, with shortened anchors to making linking to each question easier.

One question: per my earlier comments, I had trouble getting smart quotes and other typographical niceties to render properly for some reason. How are you going about entering those?

Contributor

markerikson commented Apr 2, 2016

Sure. I'm putting together a Table of Contents right now, with shortened anchors to making linking to each question easier.

One question: per my earlier comments, I had trouble getting smart quotes and other typographical niceties to render properly for some reason. How are you going about entering those?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 2, 2016

Collaborator

Hmm. I’m usually editing markdown right in my editor and only view the result before publishing.

Collaborator

gaearon commented Apr 2, 2016

Hmm. I’m usually editing markdown right in my editor and only view the result before publishing.

@markerikson

This comment has been minimized.

Show comment
Hide comment
@markerikson

markerikson Apr 2, 2016

Contributor

Right, but how are you actually typing them in? I'm on a Windows box, and tried both copying and pasting smart quotes from other docs files into this one, and also using ALT+somenumber to enter them. The values looked okay in Markdown, but not in the output. Maybe I had my text editor set to a bad codepage or something?

Contributor

markerikson commented Apr 2, 2016

Right, but how are you actually typing them in? I'm on a Windows box, and tried both copying and pasting smart quotes from other docs files into this one, and also using ALT+somenumber to enter them. The values looked okay in Markdown, but not in the output. Maybe I had my text editor set to a bad codepage or something?

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 2, 2016

Collaborator

I’m on OS X which has different shortcuts. Could it be that you only had problems locally? I think I’ve seen this happen occasionally. Maybe you could try testing them in GitHub Preview. (or in this comment field :-)

Collaborator

gaearon commented Apr 2, 2016

I’m on OS X which has different shortcuts. Could it be that you only had problems locally? I think I’ve seen this happen occasionally. Maybe you could try testing them in GitHub Preview. (or in this comment field :-)

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