German_Noob
German_Noob
TTCTheo's Typesafe Cult
Created by eSkaar on 2/10/2025 in #questions
I'm sorry, but angular, react, migration, thoughts?
Every codebase is getting more shitty the more it is worked on and if you don't want that to happen you will have to put in extra effort. What i mean is that angular gives you at least some guide rails which will keep at least those few aspects clean. Of course you can still make a mess but at least you know for each component where the template and state is defined
9 replies
TTCTheo's Typesafe Cult
Created by eSkaar on 2/10/2025 in #questions
I'm sorry, but angular, react, migration, thoughts?
You might want to consider starting small migrating only a couple of pages for an isolated use case. Preferably something that shows the strengths of react. Don't pick mostly static pages. Pick something where things happen and you have a bunch of nested components and some state. Angular templating is much better than JSX for simple things like rendering lists or conditionally rendering elements. React in turn is better when you want to define many elements and pass state.
9 replies
TTCTheo's Typesafe Cult
Created by eSkaar on 2/10/2025 in #questions
I'm sorry, but angular, react, migration, thoughts?
One thing to be careful about is the average skill level of the Team. In my experience angular codebases tend to stay cleaner as they grow than react codebases. Angular forces you to structure your code a certain way which makes it much easier for Devs that are less experienced or don't care much about frontend code. React lets you do whatever you want which is nice if you know what you're doing but sucks if you have 50 different ways to do things in the same codebase. You will have to be very deliberate about how things should be structured and how you approach training the team to avoid the many foot guns react has. I know angular can suck but it might be better than starting from scratch using a technology only you know well
9 replies
DDeno
Created by Leokuma on 6/28/2024 in #help
Running multiple Deno versions at the same time
I am kind of interested in what your use-case for running multiple versions of deno is. In general I would think that it should be safe to run multiple versions. If you do a version update you keep using the same caches and all so the structure and format of those files and folders probably don't change much. There is a good chance for conflicts if two programs try to pull the same dependency at the same time but I think that is relatively unlikely to happen. I think it's best to just try it out
7 replies
DDeno
Created by Boby on 6/24/2024 in #help
'React' refers to a UMD global, but the current file is a module.
You can try using a triple slash directive to tell deno that the react types are in fact present. https://docs.deno.com/runtime/manual/advanced/typescript/types#using-a-triple-slash-directive You place those directives at the entry point to your application. For your tests it could be your vitest config. Gl
11 replies
DDeno
Created by Boby on 6/24/2024 in #help
'React' refers to a UMD global, but the current file is a module.
Hi 👋 You are using deno as a drop-in replacement to node for a next.js project with vitest as test runner. Frameworks like next and test runner like vitest do a lot of stuff under the hood. Configuration of those tools can be incredibly difficult. Even when using the runtime those tools were developed for. 1. Your problem might not be related to deno. Make sure the project is configured correctly first. I've seen a bun lock file in your repo. Try running your tests with bun to check if the configuration is correct. 2. Deno is not intended to be a drop-in replacement for node. A lot of work was done to improve the compatibility with existing frameworks and libraries but it is not perfect and probably never will. There is still no guarantee that a node project can be run using deno. Last time I checked, next only worked in SSG Mode https://github.com/denoland/nextjs_static_template/ I don't know what the current state of deno is regarding next but there are similar projects native to the deno ecosystem that might be a better choice. I've seen https://alephjs.org/ pop up several times regarding this. Another popular choice is https://fresh.deno.dev/ 3. You can try to debug the problem yourself. There is a 3 year old stack overflow question regarding a similar problem. https://stackoverflow.com/questions/64656055/react-refers-to-a-umd-global-but-the-current-file-is-a-module Gl
11 replies