Can you clarify what’s <Row> </Row> etc.? I believe the code won’t compile using custom elements like that. So first off I would re write it like this:
Regarding <Row> </Row> this is simply a Bootstrapped element from react-bootstrap I’ve edited my code, so you can see the imports, sorry about the confusion.
I’ve tried arr.map(item => item) which solve only the single span problem, but it’s still displays like this abc.
What I would like to do is:
Display a then a fades out
Display b then b fades out (at this point b just took the place of a within the span)
ect…
I work with animations (I feel like I should have say that earlier… Sorry about this) this a micro feature that I’d like to implement for my portfolio.
Yeah, that’s a little beyond my ken. This is probably going to be an animation thing which I haven’t worked much with that part of React. It sounds like you either want them replacing each other of have those elements overlap and have them fade in and out on cue.
I see…
I’ve done a couple of searches and nothing seems to be very easy. But I wonder why not to do it just using plain js. For that, you only need a setInterval or setTimeout function, that updates the innerHTML of a span (where you can add an id).
Maybe that’s not what you’re looking for, but just in case.
Yeah, you can use a setInterval to get them to change - that’s easy. To get the fade in and fade out - that’s a little more complicated. Maybe something with transform would work.
Thank you for taking the time to work on a solution.
I’ve decided to move on to a backup feature in order to be able to continue my work on my portfolio.
However, I am implementing improvement quite regularly, and I will definitely try out your solution, so once again, thanks a lot for your time.
On a side note, I thought all the ‘will’ Lifecycle methods were out of date?
You would probably want to have the height of each at 0 to start with, to avoid them taking up space. You can do what you want really, within reason.
Note that more complex sequenced animations are easier in JS. React complicates things because of how it works (animation involves tracking a value over time, React normally just blows the value away and rerenders immediately with a new value). There are several pretty good libraries – React Transition Group/CSS Group used to be part of React years ago, it’s maintained now as a seperate library. React Spring is really good but docs are imo a bit light. Pose and Framer Motion seem to be pretty good as well.
Yep, I’ve been using animations via CSS for the very first version of my portfolio. then I used a lib called AOS to handle animations.
I think I know how I would implement this now.
But I’ve reworked my portfolio entirely, because I wanted something original, but the kind of original I wanted would actually require a much much much better understanding of React.
If you want to really understand what I had in mind at first.
You can check my Portfolio
(It’s still a WIP, as I said, I’m improving it regularly, and I will change the text later, I’m awful when it comes to market myself… haha)
Anyway, back to the main subject, instead of the “Typing” part I would have put the “Strobe Light effect”.
At this point, I am not really sure if this kind of effect would have a place in my Portfolio.