#Rendering issue

1 messages · Page 1 of 1 (latest)

proper pier
#

When trying to render the same JSX stored in state to the screen twice at the same time. It only renders one of the JSX elements.

The JSX is passed as props to the component and is stored in an accessor function returned from the createReducer primitive. I am doing something wrong?

stray grove
#

"one of the jsx"
What does that mean?
JSX gets compiled to an expression creating real dom nodes once executed. Are you trying to render the same html element in two places at once?

#

You probably need to wrap it in a thunk so that it is executed lazily, producing different html elements

proper pier
#

Or I was thinking making an copy of the piece of state as it's an array of JSX elements generated using <For> element.

stray grove
#

probably better to share some code so we are on the same page

proper pier
#

FYI, I did find a workaround but is not elegant. I'll keep trying!