Folks who do #aspnetcore development with a #javascript frontend framework (#vuejs, #angular, #react), is your frontend code part of the #dotnet solution, or have you split the backend and frontend into separate isolated folders?
I have thoughts, but would love to hear what your thoughts are. Boosts are appreciated.
If there was an #HTML element that changes it's content when users interact with other elements on the page, what name would it have?
PLEASE NOTE: I am not suggesting that this element needs to exist; I am only asking what it would be called. I'm building a CustomElement, I just want it to have a name that makes sense.
Vote and suggest others in replies. Please boost for reach!
Frontend Devs, where are we currently standing in the debate React vs. Vue.js? Or is something entirely different already taking over (SolidJS, Ember.js, Svelte, ...)?
For years, it seemed like React was almost the only way to go. Now I feel like the winds are changing and other frameworks/libraries are gaining traction.
What do you all think?
Recently I started on a #Vuejs project at my new job. I've only worked with #Angular before.
One thing I didn't like it first, turned out to be an unexpected strength. In Angular, each component has a separate template, typescript & sass file. In Vue.js this is all inside a single file! Ugly and hard to use I thought.
Instead, it's a blessing. When a component reaches 100-150 lines, it already feels like a large component. Any larger? Time to split it up. It helps keep code clean.
I'm sure these have been done to death already, but I'm thinking about doing an end-to-end project build (maybe, cloning Twitter) using #PHP, #Laravel, #VueJS and #PostgreSQL - and then documenting the entire thing on YouTube.
I'm almost positive that there are already video series out there doing this exact thing, so I'm trying to work out what would make my approach to it any more unique.
Working with #django and #vuejs I'm using custom tokens so that VueJS and Django tokens don't conflict, but I also have a need to escape to ensure users can't get my VueJS delimiters anywhere.
Is there a place I can hook in to add my own, additional escape code 🤔, or am I doomed to have to add {{value|myescape}} everywhere a value is used 😢
Starting on a rewrite of an internal tool for a client, but trying to decide on which stack to use. The previous developer is versed in Vue/express and is able to help me out if I went that route. However, I've gotten a taste of sveltekit and love it because I can combine the frontend and API pretty seamlessly. Its problems are twofold though:
The previous dev would be significantly less help
Sveltekit is very new, meaning it is constantly changing and has a smaller, though more invested ecosystem (libraries, community, etc.)
I'm leaning towards Vue/Express right now, but I'm still not sure..
I went to book a flight with Wizz Air last night and the absolute shocking web performance made me feel better about my own work.
It takes ~30s to process the #JS and render the search, literally the primary function of the site. I like the DX of #VueJS but is this kind of performance really worth it?!
I've got a sprint ahead with the goal to implement #mfa on #laravel backend with #vuejs frontend (and another third party app on .NET). The single factor (using #passport with #oauth) exists already (three years in production).
I do not like to use too many dependencies, but obviously doing it all by myself can be a high security risk as well.
However, all "plugins" I found for Laravel usually use their own frontend (blades) as well which I cannot use here.
Any ideas/input/experience on
a) the first steps for migration 1FA -> 2FA
b) using TOTP (which might be less pain for development) or rather FIDO2 (which I'd prefer but do I need to rebuild the whole authentification process?)
Especially mentioning @valorin here, but appreciate any vujes / #quasarframework developer as well ;-)
The useEffect React hook lets you perform side effects in functional components, such as fetching data, subscribing to a service, or manually changing the DOM. It can be configured to run after every render or only when certain values change, by specifying dependencies in its second argument array. The useMemo React hook memoizes expensive calculations in your component, preventing them from being recomputed on every render unless specified dependencies change. This optimization technique can significantly improve performance in resource-intensive applications by caching computed values.
Let’s walk through what we have going on here. The App() function is returning JSX containing <p>The current time is {currentTime}</p> and currentTime is defined by setCurrentTime. The code block useEffect(() => {}); executes whenever the state changes and can be used to do something like fetching data or talking to an authentication service. It also fires when the page first renders. So, what does that empty dependency array (,[]) do in useEffect(() => {},[]);? It makes sure that useEffect only runs one time instead of running whenever the state changes.
In this example, it still runs useEffect(() => {},[]); only once (instead of whenever the state changes) but it uses setInterval() inside of useEffect to refresh the state once every 1000 milliseconds.
In this one, we have three form elements: a number picker for “digits of pi”, a color picker for changing the background, and a read-only textarea field that shows the value of π to the precision specified in the “digits of pi” input. With no dependency array on useEffect(() => {});, whenever either “Digits of Pi” or the color picker change, useEffect is triggered. If you open the console and make a change, you can see how it is triggered once when you change the background color and twice when you change the digits of pi. Why? It does that because when you change the number of digits, it also changes the value of pi and you get one execution per state change.
In this revision, instead of piValue having a state, it is “memoized” and the value of the variable only changes if the value of digits changes. In this version, we are also adding a dependency array to useEffect() so that it only executes if the value of color changes. Alternatively, you could also just have two . Let’s take a look at that.
If you throw open your console and change the two input values, you will see that it is no longer triggering useEffect() twice when changing the number of digits.
Have any questions, comments, etc? Feel free to drop a comment, below.
Bonjour les expert·es en #Accessibilité#accessibility#web : est-ce que vous avez des outils libres qui permettent d'avoir des rapports sur la conformité d'un site aux différents critères d'accessibilité ?
Plus particulièrement, pour un site qui est une "appli" #VueJS
You will notice that the ArrayList class has an items property that is an array type. Lit won’t let you do something like <array-list items = ['Item 1', 'Item 2', 'Item 3']></array-list> but it is fine with you passing it in using javascript. That means that myList.items = ['Item 1', 'Item 2', 'Item 3']; does the job, fine.
#TIL about #VueJS computed functions and refactored a bit of code.
Mastodon filters are complete - my little #MastodonStarterKit won't have a notification or account profile feed, so those aren't going to be added. Needs a bit of testing.
Also, I used #ChatGPT for the first time as a development partner...and...I found it extremely helpful while learning something new.
I get that it's not 100% accurate but it's a constant, calm partner that doesn't get annoyed with all my questions. 😄
Les données de "temps réel" d'attente aux stations de transport en commun de #Nantes sont (entre autres données) dispos en open data. De mon côté,
1/j'avais besoin d'une idée de projet pour me servir de base pour apprendre #nuxt (et aussi #vuejs par la même occasion) et
2/ J'en avais marre de poireauter 20 minutes pour un tram alors que je venais de galoper après le dernier.
J'ai donc bidouillé une petite appli en bien plus de temps (et en beaucoup moins bien) que requis par quelqu'un qui maitrise la techno.
L'idée est qu'on a accès au temps d'attente pour une station, une ligne, dans une direction, sans avoir à être à l'arrêt. La source est a priori la même que celle utilisée pour afficher sur les panneaux aux stations, ça n'est donc pas dispo pour tout les arrêts. Je ne sais pas si c'est utile à quelqu'un d'autre qu'à moi mais si jamais, je suis preneur de retours.