React-redux-universal-hot-example: What's the differences between helpers and utils?

Created on 12 Jan 2016  路  3Comments  路  Source: erikras/react-redux-universal-hot-example

I mean the src/helpers and src/utils folder, what files should put in helpers folder, what should in utils folder?

question

Most helpful comment

Looks to me like /utils is a place where you can place small snippets you can use throughout the application. Small functions to build bigger things with.

/helpers is more of a place where you store code architectural snippets in my view. Things essential for bootstrapping components and developer ergonomics.

All 3 comments

Looks to me like /utils is a place where you can place small snippets you can use throughout the application. Small functions to build bigger things with.

/helpers is more of a place where you store code architectural snippets in my view. Things essential for bootstrapping components and developer ergonomics.

Looks to me like /utils is a place where you can place small snippets you can use throughout the application. Small functions to build bigger things with.

/helpers is more of a place where you store code architectural snippets in my view. Things essential for bootstrapping components and developer ergonomics.

Hi @janhoogeveen, thanks for the answer. I couldn't quite grasp it, could you please explain in other form? Thank you :D

I've run into this "issue" too while trying to structure a project. Here's how it fits me better:

  • index.js is the point of entry. It requires the modules in /modules
  • /modules contains the getAll.js and getById.js modules
  • /libs holds the individual steps a given module calls
  • /utils has very short and specific functions used throughout functions in /libs
Was this page helpful?
0 / 5 - 0 ratings

Related issues

donpinkus picture donpinkus  路  5Comments

paulinda picture paulinda  路  5Comments

IljaDaderko picture IljaDaderko  路  4Comments

chrisabrams picture chrisabrams  路  5Comments

ansonla3 picture ansonla3  路  4Comments