A basic example to reproduce a bug with react-router, react-twitter-widgets and twitter
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
public
src
.gitignore
README.md
package.json
yarn.lock

README.md

React Twitter Bug

View Demo

This repo was created to address this issue.

https://github.com/andrewsuzuki/react-twitter-widgets/issues/10

Twitter Developers Forum

https://twittercommunity.com/t/timeline-widget-not-destroyed-on-single-page-application-page-change-spa/84023

Components Used

React Router v4.0.0

https://github.com/ReactTraining/react-router

React Router v3.0.0 (branch: react-router-3.0.0)

https://github.com/ReactTraining/react-router

React Twitter Widgets v1.2.0

https://github.com/andrewsuzuki/react-twitter-widgets

The issue:

When switching between routes that load individual twitter widgets we'd receive multiple errors

Uncaught (in promise) Error: sandbox not initialized at t.addRootClass (widgets.js:9)

console output

While running this test using react-router v.4.0.0, I did not receive these errors.

While running this test using react-router v.3.0.0, I did not receive these errors.

Further investigation need to see why the error is being displyed in the full application