STRML / react-router-component

Declarative router component for React.
http://strml.viewdocs.io/react-router-component
MIT License
873 stars 94 forks source link

React 0.13.3 Uncaught TypeError: Cannot read property 'ref' of null #144

Closed kulikalov closed 9 years ago

kulikalov commented 9 years ago

Getting this error: Uncaught TypeError: Cannot read property 'ref' of null

var Locations = Router.Locations;
var Location = Router.Location;

var NotFound = Router.NotFound;

var APP =
  React.createClass({
    render:function(){
      return (
        <Template>
          <Locations>
            <location path="/" handler={Frontpage} />
            <location path="/new-estate" handler={NewEstate} />
          </Locations>
        </Template>
        )
    }
  });
STRML commented 9 years ago

Is this with the latest version of RRC?

What is that <Template> tag?

kulikalov commented 9 years ago

RRC the latest. Template - just a react component.

STRML commented 9 years ago

Okay. Have you ensured that it is not conflicting somehow?

On 6/8/15 7:47 AM, mdcsfk wrote:

RRC the latest. Template - just a react component.

— Reply to this email directly or view it on GitHub https://github.com/STRML/react-router-component/issues/144#issuecomment-109980972.

kulikalov commented 9 years ago

yes, i'm getting only this error, even without any other components

var Locations = Router.Locations;
var Location = Router.Location;

var NotFound = Router.NotFound;

var APP =
  React.createClass({
    render:function(){
      return (
          <Locations>
            <location path="/" handler={Frontpage} />
            <location path="/new-estate" handler={NewEstate} />
          </Locations>
        )
    }
  });
module.exports = APP;
kulikalov commented 9 years ago

May be this could help: My experience based on Egghead flux and react tutorials. I was using react@0.10.0 and react-router-component@0.19.0

So, now i'm trying to develop in the same manner, as i saw in those tutorials

STRML commented 9 years ago

Okay. So you say that you were using React@0.10.0 - is that what you are using in this example, or are you using the latest versions?

Could you copy/paste the output of npm ls?

kulikalov commented 9 years ago
├─┬ envify@1.2.1 extraneous
│ ├── esprima-fb@3001.1.0-dev-harmony-fb
│ ├─┬ jstransform@3.0.0
│ │ ├── base62@0.1.1
│ │ └─┬ source-map@0.1.31
│ │   └── amdefine@0.1.0
│ ├── through@2.3.7
│ └─┬ xtend@2.1.2
│   └── object-keys@0.4.0
├── es6-promise@2.2.0 extraneous
├─┬ gulp@3.9.0 extraneous
│ ├── archy@1.0.0
│ ├─┬ chalk@1.0.0
│ │ ├── ansi-styles@2.0.1
│ │ ├── escape-string-regexp@1.0.3
│ │ ├─┬ has-ansi@1.0.3
│ │ │ ├── ansi-regex@1.1.1
│ │ │ └── get-stdin@4.0.1
│ │ ├─┬ strip-ansi@2.0.1
│ │ │ └── ansi-regex@1.1.1
│ │ └── supports-color@1.3.1
│ ├── deprecated@0.0.1
│ ├─┬ gulp-util@3.0.5
│ │ ├── array-differ@1.0.0
│ │ ├── array-uniq@1.0.2
│ │ ├── beeper@1.1.0
│ │ ├─┬ dateformat@1.0.11
│ │ │ ├── get-stdin@4.0.1
│ │ │ └─┬ meow@3.1.0
│ │ │   ├─┬ camelcase-keys@1.0.0
│ │ │   │ ├── camelcase@1.1.0
│ │ │   │ └── map-obj@1.0.1
│ │ │   └─┬ indent-string@1.2.1
│ │ │     └─┬ repeating@1.1.3
│ │ │       └─┬ is-finite@1.0.1
│ │ │         └── number-is-nan@1.0.0
│ │ ├── lodash._reescape@3.0.0
│ │ ├── lodash._reevaluate@3.0.0
│ │ ├── lodash._reinterpolate@3.0.0
│ │ ├─┬ lodash.template@3.6.1
│ │ │ ├── lodash._basecopy@3.0.1
│ │ │ ├── lodash._basetostring@3.0.0
│ │ │ ├── lodash._basevalues@3.0.0
│ │ │ ├── lodash._isiterateecall@3.0.9
│ │ │ ├── lodash.escape@3.0.0
│ │ │ ├─┬ lodash.keys@3.1.1
│ │ │ │ ├── lodash._getnative@3.9.0
│ │ │ │ ├── lodash.isarguments@3.0.3
│ │ │ │ └── lodash.isarray@3.0.3
│ │ │ ├── lodash.restparam@3.6.1
│ │ │ └── lodash.templatesettings@3.1.0
│ │ ├─┬ multipipe@0.1.2
│ │ │ └─┬ duplexer2@0.0.2
│ │ │   └─┬ readable-stream@1.1.13
│ │ │     ├── core-util-is@1.0.1
│ │ │     ├── inherits@2.0.1
│ │ │     ├── isarray@0.0.1
│ │ │     └── string_decoder@0.10.31
│ │ ├── object-assign@2.1.1
│ │ ├── replace-ext@0.0.1
│ │ ├─┬ through2@0.6.5
│ │ │ ├─┬ readable-stream@1.0.33
│ │ │ │ ├── core-util-is@1.0.1
│ │ │ │ ├── inherits@2.0.1
│ │ │ │ ├── isarray@0.0.1
│ │ │ │ └── string_decoder@0.10.31
│ │ │ └── xtend@4.0.0
│ │ └─┬ vinyl@0.4.6
│ │   ├── clone@0.2.0
│ │   └── clone-stats@0.0.1
│ ├── interpret@0.6.2
│ ├─┬ liftoff@2.1.0
│ │ ├── extend@2.0.1
│ │ ├─┬ findup-sync@0.2.1
│ │ │ └─┬ glob@4.3.5
│ │ │   ├─┬ inflight@1.0.4
│ │ │   │ └── wrappy@1.0.1
│ │ │   ├── inherits@2.0.1
│ │ │   ├─┬ minimatch@2.0.8
│ │ │   │ └─┬ brace-expansion@1.1.0
│ │ │   │   ├── balanced-match@0.2.0
│ │ │   │   └── concat-map@0.0.1
│ │ │   └─┬ once@1.3.2
│ │ │     └── wrappy@1.0.1
│ │ ├── flagged-respawn@0.3.1
│ │ ├── rechoir@0.6.1
│ │ └── resolve@1.1.6
│ ├── minimist@1.1.1
│ ├─┬ orchestrator@0.3.7
│ │ ├─┬ end-of-stream@0.1.5
│ │ │ └─┬ once@1.3.2
│ │ │   └── wrappy@1.0.1
│ │ ├── sequencify@0.0.7
│ │ └── stream-consume@0.1.0
│ ├── pretty-hrtime@1.0.0
│ ├── semver@4.3.6
│ ├─┬ tildify@1.0.0
│ │ └── user-home@1.1.1
│ ├─┬ v8flags@2.0.5
│ │ └── user-home@1.1.1
│ └─┬ vinyl-fs@0.3.13
│   ├─┬ defaults@1.0.2
│   │ └── clone@0.1.19
│   ├─┬ glob-stream@3.1.18
│   │ ├─┬ glob@4.5.3
│   │ │ ├─┬ inflight@1.0.4
│   │ │ │ └── wrappy@1.0.1
│   │ │ ├── inherits@2.0.1
│   │ │ └─┬ once@1.3.2
│   │ │   └── wrappy@1.0.1
│   │ ├─┬ glob2base@0.0.12
│   │ │ └── find-index@0.1.1
│   │ ├─┬ minimatch@2.0.8
│   │ │ └─┬ brace-expansion@1.1.0
│   │ │   ├── balanced-match@0.2.0
│   │ │   └── concat-map@0.0.1
│   │ ├── ordered-read-streams@0.1.0
│   │ └── unique-stream@1.0.0
│   ├─┬ glob-watcher@0.0.6
│   │ └─┬ gaze@0.5.1
│   │   └─┬ globule@0.1.0
│   │     ├─┬ glob@3.1.21
│   │     │ ├── graceful-fs@1.2.3
│   │     │ └── inherits@1.0.0
│   │     ├── lodash@1.0.2
│   │     └─┬ minimatch@0.2.14
│   │       ├── lru-cache@2.6.4
│   │       └── sigmund@1.0.1
│   ├── graceful-fs@3.0.8
│   ├─┬ mkdirp@0.5.1
│   │ └── minimist@0.0.8
│   ├─┬ strip-bom@1.0.0
│   │ ├── first-chunk-stream@1.0.0
│   │ └── is-utf8@0.2.0
│   ├─┬ through2@0.6.5
│   │ ├─┬ readable-stream@1.0.33
│   │ │ ├── core-util-is@1.0.1
│   │ │ ├── inherits@2.0.1
│   │ │ ├── isarray@0.0.1
│   │ │ └── string_decoder@0.10.31
│   │ └── xtend@4.0.0
│   └─┬ vinyl@0.4.6
│     ├── clone@0.2.0
│     └── clone-stats@0.0.1
├─┬ gulp-browserify@0.5.1 extraneous
│ ├─┬ browserify@3.46.1
│ │ ├── assert@1.1.2
│ │ ├─┬ browser-pack@2.0.1
│ │ │ ├─┬ combine-source-map@0.3.0
│ │ │ │ ├── convert-source-map@0.3.5
│ │ │ │ ├─┬ inline-source-map@0.3.1
│ │ │ │ │ └─┬ source-map@0.3.0
│ │ │ │ │   └── amdefine@0.1.0
│ │ │ │ └─┬ source-map@0.1.43
│ │ │ │   └── amdefine@0.1.0
│ │ │ ├─┬ JSONStream@0.6.4
│ │ │ │ ├── jsonparse@0.0.5
│ │ │ │ └── through@2.2.7
│ │ │ └── through@2.3.7
│ │ ├── browser-resolve@1.2.4
│ │ ├─┬ browserify-zlib@0.1.4
│ │ │ └── pako@0.2.6
│ │ ├─┬ buffer@2.1.13
│ │ │ ├── base64-js@0.0.8
│ │ │ └── ieee754@1.1.5
│ │ ├── builtins@0.0.7
│ │ ├── commondir@0.0.1
│ │ ├─┬ concat-stream@1.4.8
│ │ │ └── typedarray@0.0.6
│ │ ├── console-browserify@1.0.3
│ │ ├── constants-browserify@0.0.1
│ │ ├── crypto-browserify@1.0.9
│ │ ├── deep-equal@0.1.2
│ │ ├── defined@0.0.0
│ │ ├─┬ deps-sort@0.1.2
│ │ │ ├─┬ JSONStream@0.6.4
│ │ │ │ ├── jsonparse@0.0.5
│ │ │ │ └── through@2.2.7
│ │ │ ├── minimist@0.0.10
│ │ │ └── through@2.3.7
│ │ ├─┬ derequire@0.8.0
│ │ │ ├── esprima-fb@3001.1.0-dev-harmony-fb
│ │ │ ├─┬ esrefactor@0.1.0
│ │ │ │ ├── escope@0.0.16
│ │ │ │ ├── esprima@1.0.4
│ │ │ │ └── estraverse@0.0.4
│ │ │ └── estraverse@1.5.1
│ │ ├── domain-browser@1.1.4
│ │ ├── duplexer@0.1.1
│ │ ├── events@1.0.2
│ │ ├─┬ glob@3.2.11
│ │ │ └─┬ minimatch@0.3.0
│ │ │   ├── lru-cache@2.6.4
│ │ │   └── sigmund@1.0.1
│ │ ├─┬ http-browserify@1.3.2
│ │ │ └── Base64@0.2.1
│ │ ├── https-browserify@0.0.0
│ │ ├── inherits@2.0.1
│ │ ├─┬ insert-module-globals@6.0.0
│ │ │ ├─┬ lexical-scope@1.1.1
│ │ │ │ └─┬ astw@2.0.0
│ │ │ │   └── acorn@1.2.2
│ │ │ ├── process@0.6.0
│ │ │ └── through@2.3.7
│ │ ├─┬ JSONStream@0.7.4
│ │ │ ├── jsonparse@0.0.5
│ │ │ └── through@2.3.7
│ │ ├─┬ module-deps@2.0.6
│ │ │ ├─┬ detective@3.1.0
│ │ │ │ ├─┬ escodegen@1.1.0
│ │ │ │ │ ├── esprima@1.0.4
│ │ │ │ │ ├── estraverse@1.5.1
│ │ │ │ │ ├── esutils@1.0.0
│ │ │ │ │ └─┬ source-map@0.1.43
│ │ │ │ │   └── amdefine@0.1.0
│ │ │ │ └── esprima-fb@3001.1.0-dev-harmony-fb
│ │ │ ├── duplexer2@0.0.2
│ │ │ ├── minimist@0.0.10
│ │ │ ├── parents@0.0.2
│ │ │ └─┬ stream-combiner@0.1.0
│ │ │   └── through@2.3.7
│ │ ├── os-browserify@0.1.2
│ │ ├─┬ parents@0.0.3
│ │ │ └── path-platform@0.0.1
│ │ ├── path-browserify@0.0.0
│ │ ├── process@0.7.0
│ │ ├── punycode@1.2.4
│ │ ├── querystring-es3@0.2.0
│ │ ├── resolve@0.6.3
│ │ ├── shallow-copy@0.0.1
│ │ ├── shell-quote@0.0.1
│ │ ├─┬ stream-browserify@0.1.3
│ │ │ └── process@0.5.2
│ │ ├── stream-combiner@0.0.4
│ │ ├── string_decoder@0.0.1
│ │ ├─┬ subarg@0.0.1
│ │ │ └── minimist@0.0.10
│ │ ├─┬ syntax-error@1.1.4
│ │ │ └── acorn@1.2.2
│ │ ├─┬ timers-browserify@1.0.3
│ │ │ └── process@0.5.2
│ │ ├── tty-browserify@0.0.0
│ │ ├─┬ umd@2.0.0
│ │ │ ├─┬ rfile@1.0.0
│ │ │ │ ├── callsite@1.0.0
│ │ │ │ └── resolve@0.3.1
│ │ │ ├─┬ ruglify@1.0.0
│ │ │ │ └─┬ uglify-js@2.2.5
│ │ │ │   ├─┬ optimist@0.3.7
│ │ │ │   │ └── wordwrap@0.0.3
│ │ │ │   └─┬ source-map@0.1.43
│ │ │ │     └── amdefine@0.1.0
│ │ │ ├── through@2.3.7
│ │ │ └─┬ uglify-js@2.4.23
│ │ │   ├── async@0.2.10
│ │ │   ├─┬ source-map@0.1.34
│ │ │   │ └── amdefine@0.1.0
│ │ │   ├── uglify-to-browserify@1.0.2
│ │ │   └─┬ yargs@3.5.4
│ │ │     ├── camelcase@1.1.0
│ │ │     ├── decamelize@1.0.0
│ │ │     ├── window-size@0.1.0
│ │ │     └── wordwrap@0.0.2
│ │ ├─┬ url@0.10.3
│ │ │ ├── punycode@1.3.2
│ │ │ └── querystring@0.2.0
│ │ ├── util@0.10.3
│ │ ├─┬ vm-browserify@0.0.4
│ │ │ └── indexof@0.0.1
│ │ └── xtend@3.0.0
│ ├─┬ browserify-shim@2.0.10
│ │ └── through@2.3.7
│ ├─┬ gulp-util@2.2.20
│ │ ├─┬ chalk@0.5.1
│ │ │ ├── ansi-styles@1.1.0
│ │ │ ├── escape-string-regexp@1.0.3
│ │ │ ├─┬ has-ansi@0.1.0
│ │ │ │ └── ansi-regex@0.2.1
│ │ │ ├─┬ strip-ansi@0.3.0
│ │ │ │ └── ansi-regex@0.2.1
│ │ │ └── supports-color@0.2.0
│ │ ├─┬ dateformat@1.0.11
│ │ │ ├── get-stdin@4.0.1
│ │ │ └─┬ meow@3.1.0
│ │ │   ├─┬ camelcase-keys@1.0.0
│ │ │   │ ├── camelcase@1.1.0
│ │ │   │ └── map-obj@1.0.1
│ │ │   ├─┬ indent-string@1.2.1
│ │ │   │ └─┬ repeating@1.1.3
│ │ │   │   └─┬ is-finite@1.0.1
│ │ │   │     └── number-is-nan@1.0.0
│ │ │   ├── minimist@1.1.1
│ │ │   └── object-assign@2.1.1
│ │ ├── lodash._reinterpolate@2.4.1
│ │ ├─┬ lodash.template@2.4.1
│ │ │ ├── lodash._escapestringchar@2.4.1
│ │ │ ├─┬ lodash.defaults@2.4.1
│ │ │ │ └── lodash._objecttypes@2.4.1
│ │ │ ├─┬ lodash.escape@2.4.1
│ │ │ │ ├─┬ lodash._escapehtmlchar@2.4.1
│ │ │ │ │ └── lodash._htmlescapes@2.4.1
│ │ │ │ └─┬ lodash._reunescapedhtml@2.4.1
│ │ │ │   └── lodash._htmlescapes@2.4.1
│ │ │ ├─┬ lodash.keys@2.4.1
│ │ │ │ ├── lodash._isnative@2.4.1
│ │ │ │ ├─┬ lodash._shimkeys@2.4.1
│ │ │ │ │ └── lodash._objecttypes@2.4.1
│ │ │ │ └─┬ lodash.isobject@2.4.1
│ │ │ │   └── lodash._objecttypes@2.4.1
│ │ │ ├── lodash.templatesettings@2.4.1
│ │ │ └── lodash.values@2.4.1
│ │ ├── minimist@0.2.0
│ │ ├─┬ multipipe@0.1.2
│ │ │ └── duplexer2@0.0.2
│ │ ├─┬ through2@0.5.1
│ │ │ ├─┬ readable-stream@1.0.33
│ │ │ │ ├── core-util-is@1.0.1
│ │ │ │ ├── inherits@2.0.1
│ │ │ │ ├── isarray@0.0.1
│ │ │ │ └── string_decoder@0.10.31
│ │ │ └── xtend@3.0.0
│ │ └─┬ vinyl@0.2.3
│ │   └── clone-stats@0.0.1
│ ├─┬ readable-stream@1.1.13
│ │ ├── core-util-is@1.0.1
│ │ ├── inherits@2.0.1
│ │ ├── isarray@0.0.1
│ │ └── string_decoder@0.10.31
│ └─┬ through2@0.4.2
│   ├─┬ readable-stream@1.0.33
│   │ ├── core-util-is@1.0.1
│   │ ├── inherits@2.0.1
│   │ ├── isarray@0.0.1
│   │ └── string_decoder@0.10.31
│   └─┬ xtend@2.1.2
│     └── object-keys@0.4.0
├─┬ gulp-concat@2.5.2 extraneous
│ ├─┬ concat-with-sourcemaps@1.0.2
│ │ └─┬ source-map@0.4.2
│ │   └── amdefine@0.1.0
│ ├─┬ gulp-util@3.0.5
│ │ ├── array-differ@1.0.0
│ │ ├── array-uniq@1.0.2
│ │ ├── beeper@1.1.0
│ │ ├─┬ chalk@1.0.0
│ │ │ ├── ansi-styles@2.0.1
│ │ │ ├── escape-string-regexp@1.0.3
│ │ │ ├─┬ has-ansi@1.0.3
│ │ │ │ ├── ansi-regex@1.1.1
│ │ │ │ └── get-stdin@4.0.1
│ │ │ ├─┬ strip-ansi@2.0.1
│ │ │ │ └── ansi-regex@1.1.1
│ │ │ └── supports-color@1.3.1
│ │ ├─┬ dateformat@1.0.11
│ │ │ ├── get-stdin@4.0.1
│ │ │ └─┬ meow@3.1.0
│ │ │   ├─┬ camelcase-keys@1.0.0
│ │ │   │ ├── camelcase@1.1.0
│ │ │   │ └── map-obj@1.0.1
│ │ │   └─┬ indent-string@1.2.1
│ │ │     └─┬ repeating@1.1.3
│ │ │       └─┬ is-finite@1.0.1
│ │ │         └── number-is-nan@1.0.0
│ │ ├── lodash._reescape@3.0.0
│ │ ├── lodash._reevaluate@3.0.0
│ │ ├── lodash._reinterpolate@3.0.0
│ │ ├─┬ lodash.template@3.6.1
│ │ │ ├── lodash._basecopy@3.0.1
│ │ │ ├── lodash._basetostring@3.0.0
│ │ │ ├── lodash._basevalues@3.0.0
│ │ │ ├── lodash._isiterateecall@3.0.9
│ │ │ ├── lodash.escape@3.0.0
│ │ │ ├─┬ lodash.keys@3.1.1
│ │ │ │ ├── lodash._getnative@3.9.0
│ │ │ │ ├── lodash.isarguments@3.0.3
│ │ │ │ └── lodash.isarray@3.0.3
│ │ │ ├── lodash.restparam@3.6.1
│ │ │ └── lodash.templatesettings@3.1.0
│ │ ├── minimist@1.1.1
│ │ ├─┬ multipipe@0.1.2
│ │ │ └─┬ duplexer2@0.0.2
│ │ │   └─┬ readable-stream@1.1.13
│ │ │     ├── core-util-is@1.0.1
│ │ │     ├── inherits@2.0.1
│ │ │     ├── isarray@0.0.1
│ │ │     └── string_decoder@0.10.31
│ │ ├── object-assign@2.1.1
│ │ ├── replace-ext@0.0.1
│ │ └─┬ vinyl@0.4.6
│ │   ├── clone@0.2.0
│ │   └── clone-stats@0.0.1
│ └─┬ through2@0.6.5
│   ├─┬ readable-stream@1.0.33
│   │ ├── core-util-is@1.0.1
│   │ ├── inherits@2.0.1
│   │ ├── isarray@0.0.1
│   │ └── string_decoder@0.10.31
│   └── xtend@4.0.0
├── jquery@2.1.4 extraneous
├── jquery-ui@1.10.5 extraneous
├── materialize-css@0.96.1 extraneous
├─┬ react@0.13.3
│ └─┬ envify@3.4.0
│   ├─┬ jstransform@10.1.0
│   │ ├── base62@0.1.1
│   │ ├── esprima-fb@13001.1001.0-dev-harmony-fb
│   │ └─┬ source-map@0.1.31
│   │   └── amdefine@0.1.0
│   └── through@2.3.7
├─┬ react-async@2.1.0
│ └── ascii-json@0.2.0
├─┬ react-router-component@0.25.1 extraneous
│ ├─┬ envify@3.4.0
│ │ ├─┬ jstransform@10.1.0
│ │ │ ├── base62@0.1.1
│ │ │ ├── esprima-fb@13001.1001.0-dev-harmony-fb
│ │ │ └─┬ source-map@0.1.31
│ │ │   └── amdefine@0.1.0
│ │ └── through@2.3.7
│ ├─┬ object.assign@3.0.0
│ │ ├─┬ define-properties@1.0.2
│ │ │ └── foreach@2.0.5
│ │ └── object-keys@1.0.4
│ ├── url-pattern@0.9.0
│ └─┬ urllite@0.5.0
│   └── xtend@4.0.0
└─┬ reactify@1.1.1 extraneous
  ├─┬ react-tools@0.13.3
  │ ├─┬ commoner@0.10.1
  │ │ ├── commander@2.5.1
  │ │ ├─┬ glob@4.2.2
  │ │ │ ├─┬ inflight@1.0.4
  │ │ │ │ └── wrappy@1.0.1
  │ │ │ ├── inherits@2.0.1
  │ │ │ ├─┬ minimatch@1.0.0
  │ │ │ │ ├── lru-cache@2.6.4
  │ │ │ │ └── sigmund@1.0.1
  │ │ │ └─┬ once@1.3.2
  │ │ │   └── wrappy@1.0.1
  │ │ ├── graceful-fs@3.0.8
  │ │ ├── iconv-lite@0.4.10
  │ │ ├── install@0.1.8
  │ │ ├─┬ mkdirp@0.5.1
  │ │ │ └── minimist@0.0.8
  │ │ ├── private@0.1.6
  │ │ ├── q@1.1.2
  │ │ └─┬ recast@0.9.18
  │ │   ├── ast-types@0.6.16
  │ │   ├── esprima-fb@10001.1.0-dev-harmony-fb
  │ │   └─┬ source-map@0.1.43
  │ │     └── amdefine@0.1.0
  │ └─┬ jstransform@10.1.0
  │   ├── base62@0.1.1
  │   ├── esprima-fb@13001.1001.0-dev-harmony-fb
  │   └─┬ source-map@0.1.31
  │     └── amdefine@0.1.0
  └── through@2.3.7
STRML commented 9 years ago

Okay thanks.

Could you zip up a minimal example for me and send it to the email address on my profile?

kulikalov commented 9 years ago

done

kulikalov commented 9 years ago

i've found out, the problem is in my local server) Anyway, thank you)

STRML commented 9 years ago

Great.

epferrari commented 9 years ago

Hi, I see this was closed, but mdscsfk would you mind sharing WHAT the issue was with your local server? I'm having the same issue running on localhost from http. Thanks.

caasi commented 9 years ago

+1 for more information please

This is critical for my application.

lamcc21 commented 9 years ago

+1 please more information, there is nothing wrong with my local server (using HTTPster) but i'm still getting a TypeError.

kulikalov commented 9 years ago

use gulp webserver or analog. Httpster doesn't support routing.

epferrari commented 9 years ago

Heads up guys, here's a tidbit that may or may not help in your use cases, but it did for me. I'm using hash routing with regular expressions. If you use something like /^user\/login\/(.*)$/ which is akin to non-regexp user/login/:id, if you don't pass an id you'll get a TypeError, because there is no route. Ok, makes sense. BUT, if you want to route somewhere regardless of if there is an :id or not, aka /^user\/login(\/(.*))?$/, it seems that the router doesn't parse the re as expected. Technically it should match user/login/ user/login or user/login/123, and capture the 123 as :id. Instead, I'll get a TypeError if the /(.*) is missing. Long story short, getting the error when no route is matched. I have not tried setting a default route or 404 route yet. Hopefully this helps someone.

STRML commented 9 years ago

@epferrari Try /user/login(/:id), see if that works for you.

epferrari commented 9 years ago

that works, thanks. Also I was stating that I expected user/login/ to work the same as user/login, which it doesn't and in fact should not.

Are you still maintaining this library, or would you suggest we migrate to rrouter in the future?

STRML commented 9 years ago

I'm still maintaining it, but not planning to significantly update any of its features, just bugfixes for new React releases.