12 Matching Annotations
  1. Aug 2021
    1. Copy and pastethe module’s code into your system and make whatever changes you find nec-essary.This is usually the right thing to do for a small component
  2. Jun 2021
    1. Rather than write new tooling we decided to take advantage of tooling we had in place for our unit tests. Our unit tests already used FactoryBot, a test data generation library, for building up test datasets for a variety of test scenarios. Plus, we had already built up a nice suite of helpers that we coud re-use. By using tools and libraries already a part of the backend technology’s ecosystem we were able to spend less time building additional tooling. We had less code to maintain because of this and more time to work on solving our customer’s pain points.
  3. May 2021
    1. MJML comes out of the box with a set of standard components to help you build easily your first templates without having to reinvent the wheel.
  4. Dec 2020
    1. For example, an event handler callback that can be used to handle both fullscreenchange and fullscreenerror might look like this:
  5. Oct 2020
  6. Sep 2020
    1. setContext / getContext can only be used once at component init, so how do you share your API result through context? Related: how would you share those API results if the call was made outside of a Svelte component, where setContext would be even more out of the question (and the API call would arguably be better located, for separation of concerns matters)? Well, put a store in your context.
    1. There’s a bunch of fiddly syntax here, not to mention 2 separate build stacks and 3 sets of dependencies, but the end result is awesome. Simply renaming a field on a shared model will reveal all the React components using that value on the front-end, and back-end code using it.
    2. The “shared” schema is effectively the API schema. These are the fields exchanged in the API, common to client and server.
  7. Jul 2020
    1. The key to successfully creating reusable components using both render props and scoped slots is being able to correctly separate behavior from presentation. Each time you create a new UI component, think “What is the core behavior of this component? Can I use this anywhere else?”
  8. May 2020
    1. There are no plans to deprecate the REST API. To reduce the technical burden of supporting two APIs in parallel, they should share implementations as much as possible.
  9. Mar 2020
    1. it comes down to opportunities for code reuse. Will your system re-use more code if you use WordPress and its very usable admin area, myriad of available plugins and themes? Or can you re-use more code by harnessing the object-oriented design, DSLs and good software development practices mecca that is Ruby, Rails and the available libraries and tools?