You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd be extremely helpful to extract out the search logic into a separate export that can be used outside JSX code.
Problem
I have a text toggle component that shows/hides text. I also have a search box that can search for text. If I haven't toggled the text component and I search I still want to know the number of hits that a search would highlight. I can't easily do this now without duplicating logic between this component and my search component.
Solution
If we extract out the search logic into a separate export, I could generate my RE, do the search, get the number of hits, then when I toggle the text view, render Highlight with the same RE and I should have the same number of hits as I do highlights.
The text was updated successfully, but these errors were encountered:
I'd be extremely helpful to extract out the search logic into a separate export that can be used outside JSX code.
Problem
I have a text toggle component that shows/hides text. I also have a search box that can search for text. If I haven't toggled the text component and I search I still want to know the number of hits that a search would highlight. I can't easily do this now without duplicating logic between this component and my search component.
Solution
If we extract out the search logic into a separate export, I could generate my RE, do the search, get the number of hits, then when I toggle the text view, render Highlight with the same RE and I should have the same number of hits as I do highlights.
The text was updated successfully, but these errors were encountered: