Skip to content

Instantly share code, notes, and snippets.

Created October 5, 2015 12:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jamesknelson/d18cbc97aeca53675b4e to your computer and use it in GitHub Desktop.
Raw React `navigated` action
function navigated() {
// Choose which component to render based on browser URL
var component = window.location.hash == "#/"
? React.createElement('div', {}, "Index Page")
: React.createElement('div', {}, "Not Found")
// Render the new component to the page's #react-app element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment