Archives : December-2015

I’ve created a bootstrap-style sidebar using Link. Here is a snippet of my code: <ul className=”sidebar-menu”> <li className=”header”>MAIN NAVIGATION</li> <li><Link to=”dashboard”><i className=”fa fa-dashboard”></i> <span>Dashboard</span></Link></li> <li><Link to=”email_lists”><i className=”fa fa-envelope-o”></i> <span>Email Lists</span></Link></li> <li><Link to=”billing”><i className=”fa fa-credit-card”></i> <span>Buy Verifications</span></Link></li> </ul> I want to set the class for the active path to active on the wrapping element <li>. I ..

Read more

I am getting this error: Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. This is my code: var React = require(‘react’) var ReactDOM = require(‘react-dom’) var Router = require(‘react-router’) var Route = Router.Route var Link = Router.Link var App = ..

Read more

React-router can’t seem to handle anything run over a local file protocol. It interprets the third slash after file:// as a route. So if you create an app and try to run it from file:///C:/myapp.html It thinks you are attempting to access the route /C:/myapp.html and throws an error saying “Warning: Location “/C:/myapp.html” does not ..

Read more

When I click on the link that contains url products/new I can access the new product page and it works fine, but if I refresh the page it returns Uncaught SyntaxError: Unexpected token <. How can I resolve this? Page product new import React from ‘react’; class ProductNew extends React.Component { constructor(props) { super(props); } ..

Read more