Echo JS 0.11.0

<~>

tracker1 comments

tracker1 2194 days ago. link 1 point
I prefer JS over C#, I prefer C# over TS ... C# (.Net Core) is open-source... I don't have to pay anyone to use it.
tracker1 2195 days ago. link 1 point
What it comes down to for me... I prefer JS over say C# for even server-side development.  Mainly because the lack of typing enforcement and flexibility.  If I'm using TypeScript, I may as well be using C# even if it's costing me in terms of time and velocity.
tracker1 2195 days ago. link 1 point
Rehash of some prior reporting.  Also, I wouldn't consider Go that similar to C.

What's interesting is the uptake in TypeScript ... personally, I don't like taking the time to enforce all the typing over JS.  But I do see the appeal.
tracker1 2195 days ago. link 1 point
In most of my projects, I compose a "base.js" that brings in settings and environment configuration. It attaches to a global of __BASE__ … I then have another base.js inside my project that maps and exports portions out of __BASE__ for other portions of my project to use. This way I can test those pieces separately and __BASE__ is never part of my source maps.

I have a separate config/settings project that composes yaml files for deployment(s) into configuration JSON ... this is combined server-side to response to a request for `/base.js` which injects the appropriate values for the application as loaded.
tracker1 2195 days ago. link 1 point
fetch... if your browser isn't at least es2017 (async function support), you're dead to me.
tracker1 2197 days ago. link 2 points
Been using the redux hooks for a project, and really been enjoying it.  My actions modules are exposing a default useActions that wraps useReducer, useMemo and bindActions which keeps the action bindings with the actions instead of each component, which has been really nice.

    import { useMemo } from 'react';
    import { bindActionCreators } from 'redux';
    import { useDispatch } from 'react-redux';
    ...
    const doSomething = (input) => ({ type: 'sometype', ... });
    ...
    ...
    export default deps => {
      const dispatch = useDispatch();
      return useMemo(
        () =>
          bindActionCreators(
            {
              doSomething,
              ...
            },
            dispatch
          ),
        deps ? [dispatch, ...deps] : [dispatch]
      );
    };
tracker1 2200 days ago. link 1 point
Haven't played with it, but looks like a decent, well rounded component suite.
tracker1 2202 days ago. link 1 point
Don't use the className like this... use a ref, it's what they're there for.  Or you can at least use the event's target attribute...

    playAudio(e) {
      e.target.parentNode.getElementsByTagName("audio")[0].play()
    }
[more]