question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi,

First of all thanks for your work.

I don’t seem to get mobx working using the latest beta-3 version.

I get SyntaxError: /home/xxx/xxx.js: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (11:1):

11 | @inject(“rootStore”)

My config-overrides.js const { override, addDecoratorsLegacy, disableEsLint } = require("customize-cra"); module.exports = override( addDecoratorsLegacy(), disableEsLint() );

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
arackafcommented, Oct 3, 2018

Anytime - I’ll update the docs to make this more clear.

2reactions
arackafcommented, Oct 3, 2018

Are you disabling eslint?

This is what my config-overrides looks like

const { override, addDecoratorsLegacy, disableEsLint, addBundleVisualizer, addWebpackAlias } = require("customize-cra");
const path = require("path");

module.exports = override(
  addDecoratorsLegacy(),
  disableEsLint(),
  config => (process.env.BUNDLE_VISUALIZE == 1 ? addBundleVisualizer()(config) : config),
  addWebpackAlias({ ["ag-grid-react$"]: path.resolve(__dirname, "src/shared/agGridWrapper.js") })
);

killing eslint is likely necessary for it to parse.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration · MobX
Most configuration options can be set by using the configure method. Proxy support. By default, MobX uses proxies to make arrays and plain...
Read more >
Enabling decorators · MobX
We intend to continue to support decorators in this form. Any existing MobX 4/5 codebase can be migrated to use makeObservable calls by...
Read more >
README · MobX
A ton of credit goes to Mendix, for providing the flexibility and support to maintain MobX and the chance to prove the philosophy...
Read more >
Installation - MobX
There are two types of React bindings, mobx-react-lite supports only functional components, whereas mobx-react also supports class based components.
Read more >
Defining data stores - MobX
Simple to set up. Supports strong typing well. Makes complex unit tests easy as you just have to instantiate a root store. Example:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found