reactour icon indicating copy to clipboard operation
reactour copied to clipboard

Unnecessary network requests

Open spiderhands opened this issue 1 year ago • 8 comments

Describe the bug On every render there is a new network request in the Network Tab

To Reproduce Steps to reproduce the behavior:

  1. Go to https://reactour.vercel.app
  2. Scroll down to "Smooth scroll"
  3. Open developer tools
  4. Navigate to the network tab
  5. Click on "Start tour"
  6. Click on the "Right arrow" of Popover

Expected behavior No requests are sent

Screenshots Screen Shot 2022-08-11 at 12 27 05 PM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Chrome
  • Version 103.0.5060.134 (Official Build) (x86_64)

spiderhands avatar Aug 11 '22 08:08 spiderhands

Hi @spiderhands, thanks for open the Issue.

I am only getting the same result on Chrome, not in FF nor in Safari. Let's investigate which could be the source of the problem.

elrumordelaluz avatar Aug 11 '22 09:08 elrumordelaluz

It seems that there are img requests.

Screenshot 2022-08-11 at 11 38 36

elrumordelaluz avatar Aug 11 '22 09:08 elrumordelaluz

Something tries to navigate to a URL with the mask hash at the end

https://emaxple.com/some-page#mask__dvybzk7rb9a

spiderhands avatar Aug 11 '22 09:08 spiderhands

where did you found this?

elrumordelaluz avatar Aug 11 '22 10:08 elrumordelaluz

Our internal deployment returns 404 with the HTML body on any page that is not the /index.html

The browser prints errors in the console like this: Screen Shot 2022-08-11 at 3 16 31 PM

spiderhands avatar Aug 11 '22 11:08 spiderhands

So you are getting the same result/issue as in the demo, in your project using @reactour/tour (outside the playground).

Is weird that those /sesson#mask__{…} calls are different of those on the demo and with different response codes.

elrumordelaluz avatar Aug 11 '22 13:08 elrumordelaluz

Also, for some reason and always using Chrome, this didn't happens on the Demo site at https://reactour.js.org which is using all updated dependencies

Screenshot 2022-08-11 at 15 34 25

elrumordelaluz avatar Aug 11 '22 13:08 elrumordelaluz

unrelated: for some reason the site on gh-pages stopped working, investigating. SOLVED

elrumordelaluz avatar Aug 11 '22 13:08 elrumordelaluz

@reactour packages now are css-in-js lib agnostic; this means avoid the creation of <style> blocks on each chage with new css declarations for each mask change and related stuff.

Please try the same demo and updating your project into @reactour/[email protected].

Screenshot 2022-08-12 at 10 44 59

On my side seems solved. Please re-open in any case.

elrumordelaluz avatar Aug 12 '22 08:08 elrumordelaluz