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 👌🎉”

Best practices for JavaScript function parameters

  • The problem with passing an object as a parameter to a function is that it’s not clear what values you should put into it.
  • One common thing in FP is to partially apply your functions, which is much harder to do if your function takes its parameters as an object.
  • While separate parameters are a good starting point, we run into trouble as soon as the function has optional parameters.
  • For functions with a single optional parameter, the solution is simple:

    Best practice: optionals come last

    However, if we have more than one optional parameter, the problem is… what if we only need to pass one optional parameter?

  • You can pass in parameters easily as an object, but the properties for the object can be easily seen from the function’s signature.

From time to time, people ask things like “should I use objects to pass function arguments”. I’m sure you recognize the pattern, as it’s common with many libraries:
Continue reading “Best practices for JavaScript function parameters”

Unopinionated, standard compliant flexbox component. No propietary APIs. Nothing but flexbox #ReactJS

  • No more , , , , or any other arbitrarily named and spec ed components to layout your apps.
  • No more , , , or any other arbitrarily named and spec ed props to layout your apps.
  • It might be a good idea to see your components and know how they are laid out without jumping between css files or arbitrary, layout-exclusive components specifications.
  • Since, well, flexbox is a complete solution to build layouts.
  • If you need to use a tag other than for the layout, like or , you can pass an extra prop to the component:

    which will render to this:

    Take a look at Flexbox PropTypes.

flexbox-react – Unopinionated, standard compliant flexbox component. No propietary APIs. Nothing but flexbox.
Continue reading “Unopinionated, standard compliant flexbox component. No propietary APIs. Nothing but flexbox #ReactJS”