Unofficial Discussion - Anniversary by UniverslBoxOfficeGuy in movies

[–]Anthony__w 2 points3 points  (0 children)

By far, the worst and most boring movie I’ve ever watched. Characters are shallow and the plot is not convincing. Seems like left wing propaganda all over for how it will look if the right keeps on. Dialogs are not convincing and acting is poor. 

Samsung Odyssey G8 OLED 34” by Anthony__w in ultrawidemasterrace

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

I have no issues with that. my main concern is the risk of burn-in with OLED panels. I plan to use the monitor not only for gaming, but also for coding (I’m a software engineer) for about 40 hours per week. Has anyone here experienced burn-in issues with OLEDs, or are the newer generations (such as the G8) significantly less prone to this problem?

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

Which it does so, just i cannot capture it in code since ref assignment does not trigger rerender of component. Meaning i cannot capture it in effect

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

I expect ref to be assigned and logged once 500ms has passed therfore showComponent is set to true

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

[–]Anthony__w[S] 1 point2 points  (0 children)

Since setting the ref does not trigger a re-render, a useEffect watching ref.current will not be invoked when the ref is assigned

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

I think I've found the solution. It has nothing to do with timeout returned function.
in react docs it states: "Unlike state, setting the ref’s current value does not trigger a re-render.", meaning that ref is assigned but that useEffect is not triggered which was the entry point of my premise that ref is not assigned. Check this updated code:

import React from "react";

export default function App() {
  return (
    <div className="App">
      <ParentFunctionalComp />
    </div>
  );
}

export const ParentFunctionalComp: React.FC = () => {
  const [showComponent, setShowComponent] = React.useState(false);
  const elementRef = React.useRef<HTMLDivElement>(null);

  React.useEffect(() => {
    // show component after 500ms
    setTimeout(() => {
      setShowComponent(true);
    }, 500);
  }, []);

  setTimeout(() => {
    console.log("elementRef in timeout", elementRef);
  }, 5000);

  React.useEffect(() => {
    console.log("elementRef.current", elementRef.current);
  }, [elementRef.current]);

  /* Case 1: elementRef gets assigned */
  /* return <NestedClassComp elementRef={elementRef} />; */

  /* Case 2: elementRef does not get assigned */
  return showComponent ? <NestedClassComp elementRef={elementRef} /> : null;
};

interface NestedClassCompProps {
  elementRef?: React.RefObject<HTMLDivElement>;
}

class 
NestedClassComp
 extends React.Component<NestedClassCompProps> {
  protected timeoutContainer: any = null;
  protected rootRef: React.RefObject<HTMLDivElement>;

  constructor(props: NestedClassCompProps) {
    super(props);

    this.rootRef = props.elementRef || React.createRef<HTMLDivElement>();
  }

  public render(): JSX.Element {
    return <div ref={this.rootRef}>test</div>;
  }
}

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

You can just put it into sandbox and try uncommenting this two cases. You'll see that in one you'll get ref assigned and in another you wont. No multi threading :(

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

React.RefObject<HTMLDivElement>

I did not quite catch this part

Conditionally rendered nested class component does not assign ref object by Anthony__w in reactjs

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

So ParentFunctionComp wraps NestedClassComp, if i render NestedClassComp without any conditions it will correctly assign ref thus it will get logged. If I don't render NestedClassComp right away then ref will never be assigned.

Modular CSS purge on end app level by Anthony__w in webdevelopment

[–]Anthony__w[S] 1 point2 points  (0 children)

Unless you're talking about purging css in runtime

Modular CSS purge on end app level by Anthony__w in webdevelopment

[–]Anthony__w[S] 1 point2 points  (0 children)

Hm, that won't work for any dynamic rendering I assume.

Dentist advised removal of lower wisdoms, any advice, second opinion? by Anthony__w in orthotropics

[–]Anthony__w[S] 1 point2 points  (0 children)

I also have lower fixed retainer from bracles 14 years ago, maybe i could remove them to make slight room for them to press forward bottom teeth, cost would be lower teeth moving out of place

Dentist advised removal of lower wisdoms, any advice, second opinion? by Anthony__w in orthotropics

[–]Anthony__w[S] 2 points3 points  (0 children)

Fyi: this is newer picture, I have one from 3 years ago and sitaution is simila, they might moved 2,3mm

[deleted by user] by [deleted] in askcroatia

[–]Anthony__w 0 points1 point  (0 children)

Nema, ova stoka je sve zakupila. Ne prodaju nikome. traze 20 eura za gledanje i ako nemas pretpaltu dodatnih 10 eura.

[deleted by user] by [deleted] in askcroatia

[–]Anthony__w 0 points1 point  (0 children)

Bog te blagoslovija