JS.weekly() => #44: When Developers Disagree

npm link, UI components with optionally controllable state and polling using RxJS

JavaScripting.com
JS.weekly()
2 min readJun 24, 2019

--

Understanding npm-link

“I used npm link while working on dependencies of the client libraries for Google Cloud Platform. All our libraries use the module @google-cloud/common. In some cases I needed to immediately see the changes in the larger libraries instead of in isolation in common.”

Mastering the two-step process of npm link is a useful addition to the toolset of any Node.js developer. The process consists of running npm linkin the dependency, and npm link some-dep in the application.”

How to Write UI components with optionally controllable state

“A large number of UI components are a function of some state and they also provide some way(s) of changing that state. A flexible implementation of these components allows both stateful and stateless usages. In React, we can maintain local state in our components via useState hook. WithuseControllableState we can maintain a local state which is optionally controlled by props.”

Polling using RxJS

Tutorial showing polling logic using RxJS with a real world example.

We are adding new libraries to JavaScripting.com every week. Here is one worth checking out:

Resize Observer

Polyfills the ResizeObserver API.

One more thing. Check the latest article on Salsita Software blog from Matthew Gertner, who is a CEO and founder of Salsita Software.

When Developers Disagree

  • Have clear policies and coding guidelines wherever possible.
  • Treat code review comments as suggestions not orders.
  • Do pair code reviews when necessary to alleviate tension.
  • Educate developers on the importance of preserving political capital.
  • Escalate important points to the whole team.
  • Get rid of squeaky wheels.

JS.weekly() is a weekly digest of the best JavaScript articles, hand-picked by our experts in the JavaScripting community, sponsored by Salsita Software. Don’t forget to follow us on Twitter.

--

--

JS.weekly()
JS.weekly()

Published in JS.weekly()

Top 3 articles, 1 tweet and 1 library from JavaScript world we found interesting during the week.

JavaScripting.com
JavaScripting.com

Written by JavaScripting.com

The best JavaScript, web development and general programming articles of the day. Sponsored by Salsita Software (http://www.salsitasoft.com)