aws / graph-explorer

React-based web application that enables users to visualize both property graph and RDF data and explore connections between data without having to write graph queries.
https://github.com/aws/graph-explorer
Apache License 2.0
317 stars 47 forks source link

Fix swiper error #474

Closed kmcginnes closed 3 months ago

kmcginnes commented 3 months ago

Description

In the search modal when the user selects a search result you would see a error in the browser's console.

This was caused by the use of setTimeout() within a useEffect(). This is almost never a good idea.

I have replaced it with useTransition(), which is the React supported way of delaying a task until the next render.

Validation

The original error

CleanShot 2024-07-03 at 18 27 27@2x

Related Issues

Check List

kmcginnes commented 3 months ago

@vkagamlyk Fixed