Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:09
    @krisb1220 banned @Gastony
  • May 14 2020 22:39
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:38
    @bjorno43 banned @real-action
  • Feb 01 2020 00:27
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:10
    @bjorno43 banned @doctor-sam
  • Aug 17 2019 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 2019 17:13
    @mstellaluna banned @cmal
  • Jan 08 2019 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
markclynch
@markclynch
there will be several things manipulated when this happens, but my issues all seem to be making things look right, functions and math et. all I'm fine with.
Aditya
@ezioda004
@AlbertoGiambone First you need to figure the logic how to separate intand float (decimals). After that you can use that logic and use .filter() method.
@markclynch I have not used animations in React such way. Checking the animations section in official docs might help.
That should help
markclynch
@markclynch
@ezioda004 Didn't even know about that,that may be useful later, seems pretty cool you can basically have an animation pop up on load then disappear on unmounting. slightly different than what I'm looking for. I think my misunderstanding is I don't know how to complete this in vanilla JS even. I have huge problems manipulating css elements inside javascript and react.js :worried:
@ezioda004 Not sure if I should just setup state with an isOn boolean and then I could conditionally render a static image or a spinning one using a toggle method, but again that sounds like it wouldn't be quite right.
markclynch
@markclynch
I'll definately need that method anyhow and the onClick function would toggle between true and false anyway.
alpox
@alpox
@markclynch i would conditionally add or remove a class from the logo and make the logo spin with css if the class is set
markclynch
@markclynch
@alpox Thanks, I'll do some googling as I didn't think that was something really doable.
conditionally adding or removing a class javascript sounds like a decent place to start googling
Claudio Restifo
@Marmiz

@markclynch have you looked into styled-components?
Or any other JS-in-CSS alternative?

Makes working with react (ie JS) super easy

markclynch
@markclynch
I started looking at it
Just watched one video
@Marmiz I watched this one Glen Maddern - Styling React Apps with Styled Components
But I'm so new that these guys don't talk like I'm an idiot
so they don't show exactly how things are done, more high level concepts
Claudio Restifo
@Marmiz
@markclynch why watch a video. Read the docs and you're good to go :smile:
alpox
@alpox
I usually use styled-components too. They are great
markclynch
@markclynch
Yeah, it's funny, I watched like a million videos on React
and got next to no understanding
then read the docs haha, now I'm starting to get it
@Marmiz does the react team like styled components?
Claudio Restifo
@Marmiz

never been fond of videos.
I generally consider docs and books the best resources to learn (at least for me).

With videos I ended up building something as they show, but unable to build what I wanted by myself :smile:

markclynch
@markclynch
@Marmiz yeah
alpox
@alpox
Videos just dont really teach and are not good for references
markclynch
@markclynch
@alpox Well, Dan Abrimov's Redux videos are pretty good
Claudio Restifo
@Marmiz

does the react team like styled components?

why should that matter?

markclynch
@markclynch
Just curious.
I know they wont endorse many libraries that come about
Claudio Restifo
@Marmiz
anyway one of the creator is the one who made react-router and parto of React. (not a FB employee tho :) )
markclynch
@markclynch
I'm just a bit lost
I mean I literally just finally got conditional rendering using ES6 syntax today lol
Aditya
@ezioda004
@markclynch Heres a quick example of how you can do spin animation with react. Basically an implementation of what @alpox said.
markclynch
@markclynch
by got I mean understand :)
alpox
@alpox
`className="{ spin: isOn}
Ups my phone sent before i was done
className={ spin: isOn}
markclynch
@markclynch
@ezioda004 cool, but is there a way to get it less choppy? Like just pause the spin, so it freezes frame then continues?
It's resetting to original placement on each render
maybe I can play and see if e.preventDefault would work :)
Aditya
@ezioda004
I'm sure theres a way, though CSS gives me midlife crisis.
markclynch
@markclynch
@ezioda004 lol
markclynch
@markclynch
actually I think i meant e.stopPropagation
but not sure lol
alpox
@alpox
@markclynch they only help if the event bubbles and makes events trigger that you dont want - or in case of preventDefault to prevent the default action (ex form submit)
markclynch
@markclynch
too much nonsense in my brain I always remember things that aren't helping
@alpox That looks like it may be helpful.
Is there any system resource concerns when running infinite loop animations at very high speeds?