Improving the usability of your modules – kentcdodds

Improving the usability of your modules  #reactjs

  • All you have to do is use it:import getContentForFile from ‘react-i18n’const i18n = App() { return ( div h1{i18n(‘header.title’)}/h1 /div )}So that’s how it works (again, I’m sure some of you are thinking of other libs that could do this better, but please spare me the “well actually.” I’m aware…
  • const content = JSON.parse( … more stuffexport {getContentForFile as default, init}This presents a few challenges for users of the module.
  • Turns out that react-i18n actually exposed another module react-i18n/bootstrap to customize this behavior which is great, but that doesn’t resolve the problem of stuff happening if someone were to import react-i18n first.So what I did was a wrapped all side-effects in a function I exported called init(which was similar to…
  • But it’s ok now because that’s clear const messages = JSON.parse( ) // … other other stuff}// … more stuffexport {getContentForFile as default, init}So this means that anyone using the module now must call the init function, but they’re doing that on their own terms and whenever they want it…
  • However, we’re in the process of “inner sourcing” this module (and perhaps open sourcing it eventually), so folks are going to use it who use different tools and have different use cases.So, if it’s not too much work and doesn’t add too much complexity, then try to make the solution…

NOTE: This is a cross-post from my newsletter. I publish each email two weeks after it’s sent. Subscribe to get more content like this earlier right in your inbox! 💌 This last week I worked on my…
Continue reading “Improving the usability of your modules – kentcdodds”

Kicking off the first day of a full-week React Native training for @LexisNexisUK 👌🎉

Kicking off the first day of a full-week  React Native training for @LexisNexisUK 👌🎉

  • Learned a lot!
  • Good introduction to the basics of React.
  • I see it as a very good starting point for further React development.
  • Very thorough introduction to React.
  • The presentations were very straightforward, especially with the format of the slides.

Interactive React and JavaScript workshop for public training, private company training, or conference workshops. The first workshop accompanied by an interactive web app for practical exercises.
Continue reading “Kicking off the first day of a full-week React Native training for @LexisNexisUK 👌🎉”

Better Understanding Of AngularJS, ReactJS And NodeJS

Better Understanding Of #AngularJS, #ReactJS And #NodeJS by @iAnkurMishra cc @CsharpCorner

  • Angular JS works with MVC platform, where it simplifies development by providing a reliable solution.
  • Some of Angular developers developed Angular JS with the primary purpose of addressing single page application creation challenges.
  • Angular code creates a module.
  • Angular JS follows some guidelines, like Angular data binding.
  • Based on a moduler architecture, Node JS simplifies the development of complex applications.

In this article, you will learn about AngularJS, ReactJS, and NodeJS.
Continue reading “Better Understanding Of AngularJS, ReactJS And NodeJS”