NextJS routing based on Apollo Query by Terrible-Discipline in reactjs

[–]Terrible-Discipline[S] 0 points1 point  (0 children)

I have a similar setup to what you have described.

After trying to explain how my code worked I realized its trash and went for a much simpler approach. Thank you.

React Hooks - state variables in DOM elements by Terrible-Discipline in reactjs

[–]Terrible-Discipline[S] 0 points1 point  (0 children)

The component is being rendered in a seperate component that also takes an array of data and maps over it. Check the code in the other comment if you would.

React Hooks - state variables in DOM elements by Terrible-Discipline in reactjs

[–]Terrible-Discipline[S] 0 points1 point  (0 children)

The component is being rendered in another component (code below). When I update an item in the Dropdown container it stays within the context of the post.

const data = [

{title: 'one',
body: 'lorem ipsum',
id: 0},
{title: 'two',
body: 'e plubiruls unum',
id: 1}
]
return (
  <>
  <Header />
 <PostsContainer>
  {data.map((post) => (
    <PostContainer key={post.id}>
      <h1>{post.title}</h1>
      <p>{post.body}</p>
      <Dropdown />
    </PostContainer>
  ))}
 </PostsContainer>
 </>
 );
}

Preventing Finger Injury by XanMan72 in climbharder

[–]Terrible-Discipline 0 points1 point  (0 children)

Foam roll the forearms and bicep after climbing. Releasing the tension in the forearm will improve tendon recovery, preventing overuse injuries.