Class Component should not re-render when updating state - reactjs

I am working on a Portfolio site that has some "Teaser Projects" appearing (in an animated way) on the home page. Each image has a project title that should appear as custom cursor when hovering the appropriate project div / image.
What should be pretty straightforward turned out to be quite complicated due to (logical) re-rendering of the component.
I set up a CodeSandbox here: https://codesandbox.io/s/nostalgic-sun-b3i2d
How can I allow the Class Component to update it's state and show the appropriate cursor div (that should follow the mouse later) without re-rendering it (and making the animation play again)?

Related

Tab navigation with React but not React-Native?

I'm into PWA development, and I'd like to use React components to build my UI, but not React-native components (otherwise why write PWAs...).
So I am looking for an equivalent to the top-tab-navigator component found here:
https://reactnavigation.org/docs/material-top-tab-navigator/
but without any React-Native dependency!
Changing pages by swiping would be great, even without a visual effect.
So far, I found React components to put tabs on displays inside pages, but nothing with navigator characteristics (full screen views, event on page change, ...).
Any help will be very appreciated.
Thank you!
So far, I found React components to put tabs on displays inside pages, but nothing with navigator characteristics (full screen views, event on page change, ...).

Need help triggering scrolling when interacting with absolutely positioned element on top of scrollview

Image showing problem triggering scrollview when touching absolute component outside
Please see above photo which describes the issue.
I'm newish to React Native layout and specifically ScrollView.
How can I make it possible for user to touch and drag anywhere on screen to initiate scroll INCLUDING touching on top of this absolute component which is outside of the scrollview?

material-ui CardActionArea onClick does nothing in some instances

I use variations of <CardActionArea onClick={someFunction}> throughout my React app, and I've come across an instance where clicking the card does not fire the onClick function. This is only when the component is rendered in a certain tree, in all other parts of the app it works as expected. I'm using in Algolia's react-instantsearch-dom component in my component that's giving the issue.
The ripple effect (the animation that shows the user clicked the card) fires in every situation. So it doesn't seem to be something as simple as a transparent div overlaying the card. Below is a working component tree compared to the one with the issue:
working
click does nothing
One odd thing you can see above is both CardActionArea components show an empty onClick. But the function still works in most cases.
I'm using onClick={() => console.log('click')} to test, so it doesn't appear to be an issue with the function itself. Any ideas on what could prevent the onClick even from firing, or suggestions for troubleshooting would be appreciated.
Edit: This issue doesn't happen in iOS Safari, but it does occur in Firefox.
Edit 2: Since I don't understand this well enough to reproduce it, and it doesn't appear to be something obvious in the code, I'm looking for troubleshooting advice. Is there something in Chrome's developer tools I can use to trace this behavior?
The issue was the anonymous component between Article and CommentEditor. The component was rendered into a Dialog conditionally, and removing the condition so that it always rendered when the Dialog was open fixed the issue.

side content bar material ui

I'm interested in creating a content nav bar, similar to this one
This screenshot is taken from Material UI's site, but I haven't been able to find a component inside the library that resembles it. Is there one? Is there a way repurpose either a Drawer of an App Bar to replicate it?
Thanks
If it’s always visible on the page that is just a normal div really.
Set it up in your component (or wherever your routes are defined) so it is on every page

How can I fix scrolling and layout issues when using react navigation?

I am currently having an issue where using a StackNavigator (created using createStackNavigator) is messing up the layout of my component.
I have attached images to explain the problem! You can see, on the first run of the app, when I just directly render the view, the component renders fine. Then, when I change it to render my navigator (whose component is the same StartPartyPageView), the layout gets messed up.
Also, when rendering within a navigator, I am unable to scroll my scroll view.
Does anyone know what could be going on here?
This is where it is working:
This is where it is not working:

Resources