From the source, seems to assume that each read chunk is suitable for markdown transformation separately, and that the final chunk in a stream will never happen.
You're creating a `new Function(...)`, this and `eval` are blocked by static analysis tooling, ad network linting applications, and other code linting tools such as eslint[1].
const compile = (template) => {
return new Function("data", "return " + compileToString(template))
}
[1] https://eslint.org/docs/rules/no-new-func
The use of eval and dynamic function creation are blocked by quite a few linters by default. This will be doubly so in most ad networks, if you happen to be targeting that context.
It's an interesting ui-library, it does remind me a bit of Bootstrap, though fewer components and less polished. From the documentation site, the colors/contrast are stark to say the least. Not my taste, but some may like it. Should also consider a few more fallback fonts, especially if you intend to support emoji character rendering in your site/application.
Okay, now add in some external data fetching (API calls) and control flow, and unit tests...
With Redux patterns, I can test my entire application state logic in reducers/action-creators and ensure that all the control flow logic is appropriate without spinning up components in unit tests.
Beyond that, this logic flow can be (re)used with react native swapping out only the UI patterns with React Native.
Should probably mention the node global error handler as well as the unhandled promise exception handler. Would also suggest showing registering for the error event in the browser in addition to error property/function assignment.
The jss library bridges the gap very well. It creates a stylesheet that is used at runtime, but will still be CSS based rendering in the browser while still performing very well on load. It's the underlying library used by @material-ui/core
At this point the only cookies I *might* have set these days is an http only refresh token... for all others I'll use sessionStorage or localStorage for.
Probably an okay guide for a total newbie... I absolutely recommend Visual Studio Code (VS Code), it's hands down one of the best editor options imo.
VS Code Killer features:
- directory tree view
- integrated terminal
- remote coding (WSL2 and SSH)
- good git integration (not great)
- okay merge tooling (not great)
If you are on Windows, install WSL2 (I prefer Ubuntu, but other options work well too, kind of a pain to get setup, but great after that). WSL2 gives you a full linux envornment to work in. With VS Code remoting, you can launch code from inside your WSL2 prompt and all is right with the world.
Also for windows, the new Terminal (both terminal and wsl2 require windows 10 version 2004 or neewer). It's just a better experience in general.
Next up, nvm... having nvm installed is a must when you work with JS and web applications, may also want a script to download/update Deno in addition to nvm/node. Deno is quickly becoming a really nice option designed for future projects, still some rough edges though.
Git. You need to get used to git, most modern source control is using it either hosted or locally. From Github, Gitlab and Azure you will see it in a career as a developer. When you install git for windows, be sure to use the option to make git tools available for windows cmd and unix. Select checkout-asis commit as unix, this will keep you in-line with the rest.
Configure git in your WSL2 to use the git credential manager in windows.
Last and certainly not least, Docker. For any services you work against locally, there's likely a dockerized version you should target. Microsoft SQL Server, check. PostgreSQL, check. RabbitMQ, redis, mysql, etc, check. Also, get used to making a docker-compose file for any project with backend services, and script everything... updates, schema changes... even if you're deploying to bare hardware you'll thank yourself. This also lets new developers onboard super quickly. By using Docker and scripting all the things, you can setup/teardown between projects at ease. If in windows, try to stick to your WSL2 environment and ensure Docker is setup and configured for WSL2 environment. Do not bother with "Windows Containers" it's a dead end.
Other than general entertainment stuff (spotify, etc), Email, Teams/Slack... the above is pretty much all I need to be productive. I also install the starship prompt and a few other bits, but the above goes a long way to being productive. I tend to prefer npm and node scripts only because my peers on Windows can also use them, and even though I do edit in wsl2, most of the docker target stuff works from windows without issue, ymmv.