Skip to content

andriimiroshnychenko/small-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a small playgrond to see how decorators (not mandarory MobX-related) is influencing class static properties. To reproduce:

  • clone repository;
  • make npm i;
  • execute ./node_modules/webpack/bin/webpack.js;
  • execute node dist/index.js.

Notice appeared error. This is related to accessing class static properties from inside other static property of the same class in src/js/class.tsx.

  • comment out @computed decorator;
  • execute rm -rf dist/ && ./node_modules/webpack/bin/webpack.js && node dist/index.js.

Notice that no error are shown, and two console.logs printed, as intended.

  • uncomment @computed decorator;
  • change name: TestClass.person.name, to smth like name: 'foo', to eliminate call of class static property;
  • execute rm -rf dist/ && ./node_modules/webpack/bin/webpack.js && node dist/index.js.

No error appeared.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published