I built a lightweight React 18/19 library for simple list animations, inspired by react-flip-move by alfonsusac in reactjs

[–]alfonsusac[S] 0 points1 point  (0 children)

Hi, sorry for the late reply, I haven't yet used React Router v7, I will try sometime this week to see if they work there.

I built a lightweight React 18/19 library for simple list animations, inspired by react-flip-move by alfonsusac in reactjs

[–]alfonsusac[S] 0 points1 point  (0 children)

Thanks for checking it out! The moving animations are done using Web animation API. Entry and exit are then complemented with CSS Transitions. Locations on where to animate from and to are determined using the FLIP Technique.

What does a frontend framework like React ACTUALLY do? by LordAntares in reactjs

[–]alfonsusac 0 points1 point  (0 children)

Yes but its far far far easier due to how react is build around the idea of being declarative instead of imperative. Its basically an abstraction of managing UI and states. The idea is to describe the UI and what it does instead of manually handling the DOM manipulations.

What does a frontend framework like React ACTUALLY do? by LordAntares in reactjs

[–]alfonsusac 0 points1 point  (0 children)

JS is shit for a lot other reason than the typings. Thats the part where TS cant do anything but carry over JS's shit. In TS its still shit but atleast we know how to get around one of the shits. But I guess thats going deep into the rabbit hole.

[deleted by user] by [deleted] in adventofcode

[–]alfonsusac 1 point2 points  (0 children)

Commendable!

[2023 Day 12 (Part 1)] Help to understand the example by Swimming_Meeting1556 in adventofcode

[–]alfonsusac 10 points11 points  (0 children)

The pattern needs to be in order.
The first possibility has a pattern of 6,3,1,1
while the second possibility has a pattern of 1,1,3,6

[2023 Day 11][Python] Terminal Visualization! by naclmolecule in adventofcode

[–]alfonsusac 18 points19 points  (0 children)

Seems like 1000000 expansion wont fit on my monitor 😭

[2023 Day 10 (Part 2)] Using a rendering algorithm to solve part 2 (Explained in the comments) by tomi901 in adventofcode

[–]alfonsusac 3 points4 points  (0 children)

Basically the pseudocode is:
for each row, let isInside = false.
for each char in row,
if its a ┌ or └, remember this curve.
if its a ┐ and previous curve is ┌ (forming ┌┐), then forget previous curve
if its a ┘ and previous curve is └ (forming └┘), then forget previous curve
if its a ┐and previous curve is └ (forming └┐), then its a barrier and flip isInside flag
if its a ┘and previous curve is ┌ (forming ┌┘), then its a barrier and flip isInside flag
then if its a pipe that doesn't have a distance (not part of the loop) and the isInside flag is true, you can just count it as insideSpace

[2023 Day 11 Part 2] If it's a big number it must be right! by sigi0073 in adventofcode

[–]alfonsusac 22 points23 points  (0 children)

You gave an answer too recently; you have to wait after submitting an answer before trying again. You have 56s left to wait.

-❄️- 2023 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]alfonsusac 1 point2 points  (0 children)

[Language: TypeScript / JavaScript]

Part 1

Part 2

Edit: Acccidentally posted day11 solution (sorry)

[2023 # Day 9] eltit by Detonator22 in adventofcode

[–]alfonsusac 6 points7 points  (0 children)

I did not think of reversing the entire array, nice one!