react-router icon indicating copy to clipboard operation
react-router copied to clipboard

Hash history needs a DOM

Open gagayang opened this issue 10 years ago • 1 comments

I tried to use Web Worker in the Web project with react then the error was found "History needs a DOM Hash" But I did not use react-router in hashHistory. is not in the use of react-router must be bound in an existing DOM? Because the principle of Worker Web is to put the DOM fragments together and then hang in the tree dom.

gagayang avatar Jun 29 '16 09:06 gagayang

Unfortunately, history has a hard check for window.document. You can make it work with a memory history instead.

timdorr avatar Jun 29 '16 16:06 timdorr