Echo JS 0.11.0

<~>

tracker1 comments

tracker1 1705 days ago. link 1 point
Decent start on these things... might be worth digging in a bit deeper in a few areas.

I would suggest taking the next steps, which would be adding unit tests with an effort for high (>80%) code coverage, I find Jest is easiest to configure, and has some nice integrations for React apps.  This will help you to understand how to make your code more modular/accessible.

From there, would create Dockerfile(s) and docker compose files to make it easier to stand up an instance for local testing/usage.  You could go another step and setup an integration test project to work with this using puppeteer or Playwright.

After that, would circle around and look into Redux patterns as well as possibly GraphQL services.  Once you've started writing tests for your applications, it's much easier to see how helpful Redux as a control flow pattern can really help.  There are other options, but I find Redux + thunks extension cover most of the bases for most applications, and allow for horizontal feature growth without blowing out complexity.
tracker1 1711 days ago. link 1 point
It's a little more wordy than it needs to be.  The "title" example is contrived and doesn't need useEffect.  Multiple calls for useEffect should be avoided, in fact too many hook calls in components can be detrimental to performance in general, for some things, it should be closer to the top level and integrated with Redux, or whatever you use for state management.
tracker1 1712 days ago. link 1 point
In practice, I'm generally using Redux for almost everything.  Two areas I am not is specifically strings/language and sometimes with Forms.  I use context for language, and may use state or context for forms.

One thing that is a side effect I explicitly do with language/strings is that the current/selected language as well as the current language strings are accessible as globals in the language/strings module(s).  This is only so that they are accessible in error messages/conditions that might be in an Action or Reducer.  It's "sloppy" but effective.

For the components, I use "useStrings()" which gets the current strings from context.

I also use the browser language events as well as an override in the UI that override is set in redux and those events update the current strings to use in context and globally.
tracker1 1713 days ago. link 1 point
I'm not seeing anything regarding access restrictions... I would emphatically *NOT* use this unless everything the account in use has access to is meant to be public, and has no write access to the database.
tracker1 1714 days ago. link 1 point
No access security restrictions, don't put this on anything where all data in the database is meant to be anything other than publicly accessible.
tracker1 1714 days ago. link 2 points
updated to target url, and blocked gitconnected.
tracker1 1721 days ago. link 1 point
Cool.. would be cool if react components were supported... I've leaned so heavily on material-ui the past few years, I'd rather not go without it.  Though bootstrap is easy enough to integrate with just the (S)CSS from source.
tracker1 1721 days ago. link 1 point
When creating a crypto key from a known value would use pbkdf2 @ 10000 or higher iterations for the encryption key from known key, MD5 is *NOT* sufficient.  

When an IV or salt is used, it should be unique to each encode.  Can be added to the encrypted output or stored separately... re-using the IV allows for a broader attack surface, especially if the encoded content is simlar, such as JSON encoded objects, etc.
tracker1 1726 days ago. link 1 point
Didn't notice it called out, but Brotli in time to compress is roughly the same as .gz, pest to use it for pre-compressed files at build-time, not dynamic compression at runtime (unless the server will compress/cache the results), not good for dynamic routes.
[more]