JS.weekly() => #44: When Developers Disagree
npm link, UI components with optionally controllable state and polling using RxJS
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 link
in 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.