Skip to content
This repository has been archived by the owner on Oct 13, 2018. It is now read-only.

Using script with React #33

Open
zaalbarxx opened this issue Apr 11, 2016 · 0 comments
Open

Using script with React #33

zaalbarxx opened this issue Apr 11, 2016 · 0 comments

Comments

@zaalbarxx
Copy link

Hello!
I just encountered a very strange problem related to browser script. In short I have Webpack-React-Redux-PHP stack. I have configuration for Browsersync server and I use both PHP(port 8001 and Browsersync on 3000).

I fetch the index page from PHP via proxy. When I use BrowserSync server with script I get some issues with Material-UI switch, the callback returns wrong switch state, when I configure BrowserSync like this
scriptPath: function(){}

(so basically I remove the script) it starts working well on both dev environment(with Browsersync) and in prod env(localhost:8001). It looks like Browsersync is pushing some additional events on click so when I actually hit the callback the value is not updated at time. So when I have switch in off state I should receive true in click callback, but I receive false instead. Do you have any idea what could potentially cause this issue ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant