GithubHelp home page GithubHelp logo

mobxjs / mobx-react-devtools Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 49.0 753 KB

[DEPRECATED] Tools to perform runtime analyses of React applications powered by MobX and React

License: MIT License

JavaScript 100.00%

mobx-react-devtools's People

Contributors

alexilyaev avatar amilassin avatar andykog avatar egorshulga avatar eswat avatar gpfunk avatar hiroppy avatar hnordt avatar janaagaard75 avatar jasonk avatar kiwipom avatar mattruby avatar max9599 avatar mweststrate avatar npmcdn-to-unpkg-bot avatar panjiesw avatar realityforge avatar rifler avatar rokoroku avatar srg-kostyrko avatar will-stone avatar wkillerud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobx-react-devtools's Issues

Include store name with action name in console log

Hello!
Is it possible to have the store name included when logging action? Something like action 'MyStore.myAction' instead of action 'myAction'? I'm aware of custom action names for debugging but will be great to have this automatically somehow. I'm not sure it is possible though...
Thanks!

Logged event types should be configurable

Hi,

it would be very handy if we could configure which particular event types gets logged. Currently every event gets logged by the spy listener which often results in huge amounts of console logs.

In most cases I would just like to see action logs per default and then enable more logs (e.g. reactions) on demand. This would be particular useful for ReactNative where you cannot rely on other devTools.

It would also be helpful to output timestamps for each log statements.

Regards.

PS: I think especially people coming from Redux are used to workflows like that, see Redux Logger: https://github.com/evgenyrodionov/redux-logger

Uncaught TypeError: Cannot read property 'spy' of undefined

Cannot enable extended logging, Chrome version 58.0.3029.110 (64-bit), full error:

Uncaught TypeError: Cannot read property 'spy' of undefined
    at t.setGlobalState (eval at ../node_modules/mobx-react-devtools/index.js (http://localhost:8081/dist/js/vendor.js:7411:1), <anonymous>:1:15361)
    at r.handleToggleLog (eval at ../node_modules/mobx-react-devtools/index.js (http://localhost:8081/dist/js/vendor.js:7411:1), <anonymous>:1:29960)
    at Object.ReactErrorUtils.invokeGuardedCallback (eval at ../node_modules/react-dom/lib/ReactErrorUtils.js (http://localhost:8081/dist/js/vendor.js:9837:1), <anonymous>:69:16)
    at executeDispatch (eval at ../node_modules/react-dom/lib/EventPluginUtils.js (http://localhost:8081/dist/js/vendor.js:9382:1), <anonymous>:85:21)
    at Object.executeDispatchesInOrder (eval at ../node_modules/react-dom/lib/EventPluginUtils.js (http://localhost:8081/dist/js/vendor.js:9382:1), <anonymous>:108:5)
    at executeDispatchesAndRelease (eval at ../node_modules/react-dom/lib/EventPluginHub.js (http://localhost:8081/dist/js/vendor.js:9356:1), <anonymous>:43:22)
    at executeDispatchesAndReleaseTopLevel (eval at ../node_modules/react-dom/lib/EventPluginHub.js (http://localhost:8081/dist/js/vendor.js:9356:1), <anonymous>:54:10)
    at Array.forEach (native)
    at forEachAccumulated (eval at ../node_modules/react-dom/lib/forEachAccumulated.js (http://localhost:8081/dist/js/vendor.js:10513:1), <anonymous>:24:9)
    at Object.processEventQueue (eval at ../node_modules/react-dom/lib/EventPluginHub.js (http://localhost:8081/dist/js/vendor.js:9356:1), <anonymous>:257:7)
    at runEventQueueInBatch (eval at ../node_modules/react-dom/lib/ReactEventEmitterMixin.js (http://localhost:8081/dist/js/vendor.js:9850:1), <anonymous>:17:18)
    at Object.handleTopLevel [as _handleTopLevel] (eval at ../node_modules/react-dom/lib/ReactEventEmitterMixin.js (http://localhost:8081/dist/js/vendor.js:9850:1), <anonymous>:28:5)
    at handleTopLevelImpl (eval at ../node_modules/react-dom/lib/ReactEventListener.js (http://localhost:8081/dist/js/vendor.js:9863:1), <anonymous>:72:24)
    at ReactDefaultBatchingStrategyTransaction.perform (eval at ../node_modules/react-dom/lib/Transaction.js (http://localhost:8081/dist/js/vendor.js:10383:1), <anonymous>:140:20)
    at Object.batchedUpdates (eval at ../node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js (http://localhost:8081/dist/js/vendor.js:9785:1), <anonymous>:62:26)
    at Object.batchedUpdates (eval at ../node_modules/react-dom/lib/ReactUpdates.js (http://localhost:8081/dist/js/vendor.js:10149:1), <anonymous>:97:27)

Move 'prop-types' to peerDependencies

Right now using mobx-react-devtools triggers a warning in console:

Warning: Failed prop type: Calling PropTypes validators directly is not supported by the prop-types package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types

It's due to a bug in prop-types<15.5.10 which was fixed in this commit facebook/prop-types@118249e

mobx-react-devtools however is prebundled with an older version of prop-types which doesn't contain this fix.

I think it should use the version of prop-types installed by the user instead of adding one in it's package.

Production mode

How do you disable / not include this module in production setup? I tried to look it up in the docs but I couldn't find anything.

I'm using an ejected create-react-app, so it automatically adds:

process.env.BABEL_ENV = 'production'
process.env.NODE_ENV = 'production'

in the build script. Is there any way to conditionally load mobx-devtools based on these variables for example?

publish fixed ts definition

Hi,
I'm sorry to bring this up here.

Since #42 is merged, would you publish a new version to npm? We heavily use typescript with strict null check and this prevent successful build without manually hack into installed mobx-react-devtools in node_modules.

Thanks

Cannot read property 'renderReporter' of undefined

Hiya,

I'm receiving the following error when I import and use the Devtools component in my React app:

Uncaught TypeError: Cannot read property 'renderReporter' of undefinede @ index.js:1value @ 
index.js:1invokeComponentDidMountWithTimer @ ReactCompositeComponent.js:54notifyAll @ 
CallbackQueue.js:67close @ ReactReconcileTransaction.js:81closeAll @ 
Transaction.js:204perform @ Transaction.js:151batchedMountComponentIntoNode @ 
ReactMount.js:126perform @ Transaction.js:138batchedUpdates @ 
ReactDefaultBatchingStrategy.js:63batchedUpdates @ 
ReactUpdates.js:98_renderNewRootComponent @ 
ReactMount.js:285_renderSubtreeIntoContainer @ ReactMount.js:371render @ 
ReactMount.js:392(anonymous function) @ routes.js:33(anonymous function) @ 
routes.js:34(anonymous function) @ bundle.js:1173__webpack_require__ @ 
bundle.js:20(anonymous function) @ multi_main:3(anonymous function) @ 
bundle.js:2376__webpack_require__ @ bundle.js:20(anonymous function) @ 
bundle.js:64(anonymous function) @ bundle.js:67

The devtools themselves don't actually work, but the toolbar is visible. In addition, all of my app functionality - routing via react-router, form -> get request, etc. - is now causing a page reload where before it wouldn't.

My app is built on top of [email protected]. Not sure if that is relevant or not.

Thanks for any help!

Restore settings from localStorage on componentWillMount

I'm running into a problem where the mobx DevTools miss some actions that run synchronously with the page load (its an authentication check that gets run by a react-router onEnter callback).

I dug a little deeper and found that it's caused by running the restoreLogFromLocalstorage in componentDidMount in LogControl here:

Would it break things to run it in componentWillMount, which (I think) would cause it to run before those actions? Don't know if that messes up other things.

For now, I've worked around it by running this in my own Root component's componentWillMount:

const logEnabled = window.localStorage.getItem('mobx-react-devtool__logEnabled') === 'YES';
configureDevtool({ logEnabled });

Chrome console dark theme coloring

This is a minor thing, but is there any chance the blue log color could be lightened a bit, it looks very harsh in Chrome's dark theme

screen shot 2016-07-15 at 20 37 47

Cannot find module css-loader

I've installed this for a simple (typescript) project. I get a compilation error saying:
Cannot find module '!!./../node_modules/css-loader/index.js!./devtools.css' from \my\path\node_modules\mobservable-react-devtools.
I also tried installing css-loader, but that makes no difference.
Am I supposed to do anything else beyond just the npm install and using require in my main .ts file? Thanks.

Feature Request: Tabular Data

I currently have a project that can render tens of thousands of elements. I use observable objects with sideways loading to render items very fast, however, changes that affect all the elements can take 2-4 seconds (unacceptable for UI purposes). I have a lot of options to optimize, but knowing what is taking the most time would help to peel the onion. I can use chrome devtools to show that most of the time is spent in scripting, but I don't know if that is my code, mobx, or react diffing. If I try to use the the mobx-react-devtools log function, it generates so many log statements to the console that it locks up chrome for a long time. Even if I wait for them to catch up, it is too much data to sift through. Would it be possible to implement a tabular data feature that generates only one log statement after each update? Something like an object that lists what actions/computations/renders were performed, how many times each was performed, and ave & total times for each would be awesome. I am doing something similar in my code ad-hoc but it is very intrusive into my code and makes things less manageable.

DevTools position on page

How I can position DevTools in other view port location opposed to a right-top corner? for example DevTools container blocking navigation in my app. I wish I could set props on DevTools component for example: <DevTools className="Position-bottomRight" style={{bottom: '10px', right: '10px'}} />

No color graphics in Ubuntu 14.04

I can see in my console log that start and finish times are being observed, but I am not seeing color graphics or any new display in the browser. I checked this with Chrome, Firefox, and Opera on my Ubuntu 14.04 box. The web page I am testing loads from http://schalk.ninja .

Programmatically set default state of graph, logs, & updates on render

I would like a way to automatically set the state of the dev tools on render. Something like:

<DevTools noPanel graphEnabled={true} logEnabled={true} updatesEnabled={true}/>

I basically always want the logs to be on when I'm in my dev environment. This wouldn't normally be a big problem (you just click the button and be done with it), but my app is rendering inside of an iframe inside another application which makes a page refresh clear the active state of the mobx-react-devtools on every refresh.

I know that I could just build my own custom panel design and hook into the active state of each button, but that's a lot more work than I'm hoping to do to just turn one on/off statically.

Styling doesn't support bottom placement

This is pretty minor.

I prefer placing the devtools panel at the bottom right of the browser window, because I find that it can get in the way of the web app behind it, when the panel is in the top right corner. It's easy to position the panel by defining bottom and right, but the result in top notch, because the panel doesn't have a border and rounded corners at the top of it.

<DevTools position={{ bottom: 0, right: 20 }}/>

One solution would be to have the border and border radius on all four corners of the panel, and then position the panel a couple of pixels off screen. Somewhat like this: https://github.com/janaagaard75/mobx-react-devtools/commit/6a90dd46246b49c52fcda664c1cc23045625dbe8

Can this be attached to any dom outside the react app root?

similar to redux-devtools.
Because I want to leverage webpack code splitting with this. Something like this

if (__DEVTOOLS__) {
  require.ensure([], require => {
    const DevTools = require('mobx-react-devtools');
    ReactDom.render((
      <DevTools />
    ), document.getElementById('devtools'));
  }, 'mobx-devtools');
}

[Feature] Props inspection / proposal

Hi, I don't know what's the status of this project. Is there some roadmap / future?

I don't fully understand the intention / ambition of this tool so in the meantime I've been "playing" around to get to display the props from the components.

Here is a video of how it looks like for now: Screencast on youtube
Quite useful for a quick inspection instead of looking for it in the chrome inspector tabs.

I could make a proper PR after discussing this a bit if you are interested. I was not sure about the "tree / graph" feature so I just created a new thing.

Strange Popup

when id is 2 ,I don't know why this window appears。
Click Add button, id will Increment。
I want know This is my Program Problem or Friendly Debug Tool Problem。
image

part of the code

// mobx log
setLogEnabled(true)
setUpdatesEnabled(true)
setGraphEnabled(true)


//TestStore
export default class TestStore {
  @observable public id: number = 1
  @action
  public async updateId() {
    this.id++
  }
}

// view
@observer
export default class Main extends React.Component <{ testStore ?: TestStore }, {}> {
  public render() {
    return (
      <div>
        {JSON.stringify(this.props.testStore)}
        <button onClick={() => this.props.testStore.updateId()}>Add</button>
      </div>
    )
  }
}

Create blank component for production

Hi , when using React you'd like the component to simply not be imported or to render a blank return null when it runs in a production environement e.g. NODE_ENV = "production" . It's very cumbersome to render it conditionally, and even harder inside a react component.

Do you want me to do a PR on this ?

Typescript Error TS2305

Hi,

I'm using

import DevTools, { configureDevtool }  from 'mobx-react-devtools';

in a typescript 2@beta and rc project. TSC complains that

error TS2305: Module 'mobx-react-devtools/index"' has no exported member 'configureDevtool'.

If I update the index.d.ts file, the following works:

/**
 * Turns a React component or stateless render function into a reactive component.
 */
import React = require('react');

export interface IDevToolProps {
    hightlightTimeout?: number;
    position?: {
        top?:    number | string;
        right?:  number | string;
        bottom?: number | string;
        left?:   number | string;
    }
}

export default class DevTools extends React.Component<IDevToolProps, {}> { }

export function configureDevtool(options: any) : void

Server rendering

Hi,

First of all awesome work on mobx guys, my code is getting some much cleaner ! :)
I'm having some issue with the server side rendering of mobx-react-devtools, it looks like the style properties aren't generated in the same order on the server/client.

Because of that I'm getting this issue:

React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
 (client) d="237"><div style="position:fixed;heigh
 (server) d="237"><div style="border-style:solid;f

Do you think it could be an issue related to radium ?
There is some weird properties in the style as well:

panel:[object Object];button:[object Object];button-log:[object Object];button-log-active:[object Object];button-updates:[object Object];button-updates-active:[object Object];button-graph:[object Object];button-graph-active:[object Object]

Here is the generated markup:
Server:

<div style="position:fixed;height:26px;background-color:#fff;color:rgba(0, 0, 0, 0.8);border-radius:0 0 2px 2px;border-style:solid;border-width:0 1px 1px;border-color:rgba(0, 0, 0, 0.1);z-index:65000;font-family:Helvetica, sans-serif;display:flex;padding:0 5px;panel:[object Object];button:[object Object];button-log:[object Object];button-log-active:[object Object];button-updates:[object Object];button-updates-active:[object Object];button-graph:[object Object];button-graph-active:[object Object];top:0px;right:20px;" data-reactid="238">

Client:

<div style="border-style:solid;font-family:Helvetica, sans-serif;panel:[object Object];top:0px;padding:0 5px;border-radius:0 0 2px 2px;color:rgba(0, 0, 0, 0.8);position:fixed;button:[object Object];display:flex;right:20px;button-graph:[object Object];border-color:rgba(0, 0, 0, 0.1);button-graph-active:[object Object];button-updates-active:[object Object];border-width:0 1px 1px;background-color:#fff;z-index:65000;button-log-active:[object Object];button-updates:[object Object];height:26px;button-log:[object Object];" data-reactid="238">

Thanks

Support dependency trees for higher-order components

It would be very useful (and necessary, in my opinion) to support being able to view the dependency trees for higher-order components.

Currently, if you select a component wrapped with higher-order components in the dependency tree viewer, it will only show you the top-most higher-order component. This is usually not very helpful, as the most important dependency tree is usually in the base component.

It would be nice to have a way of paging through the different components in the dependency tree viewer.

[Question] - Clarification on log terminology for actions

Hi there,

Quick question for ya. This is probably going to be super obvious once you answer, but I just can't seem to figure out what the @xxx after some actions is supposed to mean (see image below)

Can you clarify? I'd imagine this to be line number, but they don't match up (at least not in the source maps).

Thanks in advance.

image

EventEmitter memory leak

Hi,

I’m getting the following error when I attempt to test a component that contains the Mobx React Devtools component as a child:

console.error E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\mobx-react-devtools\index.js:1
      (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit.
    console.error console.js:89
      Trace
          at n.addListener (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\mobx-react-devtools\index.js:1:8225)
          at t.u.value (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\mobx-react-devtools\index.js:2:4279)
          at invokeComponentDidMountWithTimer (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\ReactCompositeComponent.js:60:18)
          at CallbackQueue._assign.notifyAll (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\CallbackQueue.js:67:22)
          at ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\ReactReconcileTransaction.js:81:26)
          at ReactReconcileTransaction.Mixin.closeAll (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\Transaction.js:204:25)
          at ReactReconcileTransaction.Mixin.perform (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\Transaction.js:151:16)
          at batchedMountComponentIntoNode (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\ReactMount.js:127:15)
          at ReactDefaultBatchingStrategyTransaction.Mixin.perform (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\Transaction.js:138:20)
          at Object.ReactDefaultBatchingStrategy.batchedUpdates (E:\Documents\Visual Studio Projects\Opus4 Core\Opus.Web.Scripts\node_modules\react\lib\ReactDefaultBatchingStrategy.js:63:19)

I’m attempting to mount the parent component using Enzyme's mount function. Is there a way of either fixing this so the error goes away, or telling the Dev Tools not to render during tests so it becomes a non-issue?

Thanks :)

Chrome extension

Hi there - not sure if this is the right place for a feature request, but I think it would be great if this were a Chrome extension instead of / as well as a React component. Thoughts?

Console statements in `componentWillReact` do not work if devtools logging is enabled

A componentWillReact function such as

componentWillReact() {
  console.log('Reacting!');
}

will not do anything if the devtools logging is enabled. Instead, messages such as

updated '[email protected]': 1232321 (was: 123232)
mobx.js?6a62:1123 reaction 'MyComponent#0.render()'

will be printed.

After disabling the devtools logging, Reacting! is printed as expected.

This caused a bit of confusion for us, as it seemed like componentWillReact was not being called properly. Is this a bug or intended?

PreventDefault for devtool button events

Hi there.

Thanks for your work on this. Super useful.

One issue I'm running into is that, where I'm using the devtool, clicking any button causes the page to reload. Is preventDefault set on the click event for those buttons? If not, could it be?

CSS Style

I would suggest adding a high value 'z-index' property to the class: .mobservable-devtools-wrapper or add instructions in the documentation warning that it may remain hidden under a fixed header.
In my case, it was hidden under a fixed header I have and I added the z-index in a CSS file in my project to fix it.

Accessing PropTypes via the main React package is deprecated

using :
[email protected]
[email protected]
[email protected]

running npm test - it fails, added trace to fbjs warning, it points at this repo,


    console.error console.js:89
      Trace: Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
          at printWarning (C:\projects\graphics-gen\node_modules\fbjs\lib\warning.js:36:17)
          at warning (C:\projects\graphics-gen\node_modules\fbjs\lib\warning.js:60:22)
          at Object.get [as PropTypes] (C:\projects\graphics-gen\node_modules\react\lib\React.js:95:49)
          at Object.e.__esModule.default (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:21903)
          at t (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:589)
          at Object.e.__esModule.default (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:14653)
          at t (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:589)
          at Object.t.exports (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:2868)
          at t (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:589)
          at Object.e.__esModule.default (C:\projects\graphics-gen\node_modules\mobx-react-devtools\index.js:1:958)

ReferenceError: window is not defined

Hello, I got issues loading the devtools with server side rendering.

I'm using react-router v2 following this guide:
https://github.com/reactjs/react-router-tutorial/blob/start/lessons/13-server-rendering.md

If I remove the devtools, the page is rendered correctly.

> [email protected] server:prod /react-project
> NODE_ENV=production node ./server.bundle.js

/react-project/node_modules/mobx-react-devtools/index.js:6
!function(){"use strict";function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n))e.push(o.apply(null,n));else if("object"===r)for(var a in n)i.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}var i={}.hasOwnProperty;"undefined"!=typeof e&&e.exports?e.exports=o:(n=[],r=function(){return o}.apply(t,n),!(void 0!==r&&(e.exports=r)))}()},function(e,t,o){var n=o(9);"string"==typeof n&&(n=[[e.id,n,""]]);o(17)(n,{});n.locals&&(e.exports=n.locals)},function(e,t,o){t=e.exports=o(10)(),t.push([e.id,'.wSDk9Hyhl-CKUJEuLIr5y{position:fixed;height:26px;background-color:#fff;color:rgba(0,0,0,.8);border-radius:0 0 2px 2px;border-style:solid;border-width:0 1px 1px;border-color:rgba(0,0,0,.1);z-index:65000;font-family:Helvetica,sans-serif;display:flex;padding:0 5px}._3HHdqO8CEZraYlCdQ--7a9{color:rgba(0,0,0,.6);text-align:center;text-decorat

ReferenceError: window is not defined
    at /react-project/node_modules/mobx-react-devtools/index.js:6:8347
    at /react-project/node_modules/mobx-react-devtools/index.js:6:8279
    at e.exports (/react-project/node_modules/mobx-react-devtools/index.js:6:8565)
    at Object.<anonymous> (/react-project/node_modules/mobx-react-devtools/index.js:6:507)
    at t (/react-project/node_modules/mobx-react-devtools/index.js:1:733)
    at Object.e (/react-project/node_modules/mobx-react-devtools/index.js:1:9037)
    at t (/react-project/node_modules/mobx-react-devtools/index.js:1:733)
    at Object.t.exports (/react-project/node_modules/mobx-react-devtools/index.js:1:1851)
    at t (/react-project/node_modules/mobx-react-devtools/index.js:1:733)
    at e.__esModule.default (/react-project/node_modules/mobx-react-devtools/index.js:1:820)

Couldn't find preset 'es2015' relative to directory "node_modules\mobx-react-devtools"

Hi,

I did the following:

react-native init projectname
cd projectname
npm install --save-dev rnpm-plugin-windows
react-native windows

npm install mobx --save
npm install mobx-react --save
npm install --save-dev mobx-react-devtools

Opened up index.windows.js

Added to the top of file
import DevTools from 'mobx-react-devtools';

Added inside the Component

Ran react-native run-windows

And then once it launches the windows tool, i get an error saying:
Couldn't find preset 'es2015' relative to directory "node_modules\mobx-react-devtools"

Unfortunately I haven't set up my computer for Android development yet so I'm not sure if it's a windows only issue.

I tried running npm install babel-preset-es2015 --save --no-bin-links as suggested by other forums like https://github.com/laravel/elixir/issues/354

But nothing seems to help.

Any ideas why this would be happening?

Thanks
Cherie

Allow control over buttons

Rather than giving us a pre-styled output, could we have access to just the events for each button?

A step above that would be to provide a way to get each icon individually.

Final step above that would be to allow not having position fixed on the entire devtools.

Use case is that we don't want it fixed in our app but in a dropdown that we show, so any of the solutions would help.

Use devtools in React Native with Mobx State Tree

Hello,

I'm trying to use mobx-remotedev with React Native and MobX-State-Tree but I don't know how to do.
I tried with export default remotedev(AppStore, { global: true, remote: true }) in my rootStore but I get an error Unhandled JS Exception: Cannot read property 'create' of undefined cause I create the tree with const appStore = AppStore.create({ users: {} }, { logger: logger })

Can you orient me?

Thanks for readding

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.