Anyone doing any weird styling dynamic using reagent? I setup some dynamic shadows for fun lately
like what?
Well I calculate the angle and distance of say the mouse cursor to a div, and use that info to set the :box-shadow property
It really works great for making my computer's fans turn on
that doesn't seem like it should consume too much cpu
i'd be interested to compare to a vanilla js react with hooks version. i suspect immutability and the wrappers add some significant overhead
Yeah I guess it's not actually so bad. Just seems intuitively like something a shader could do better. Anyways you can see an example of the dynamic shadows here: https://escherize.com/#/post/neumorph
I dont think that works on mobile, at least there's no pointer to move around
you might want to debounce the mouse-move
event
or throttle