andrewdavey / immutable-devtools

Chrome Dev Tools custom formatter for Immutable-js values
BSD 3-Clause "New" or "Revised" License
661 stars 29 forks source link

Any plan to work in React Native? #26

Open tiye opened 8 years ago

tiye commented 8 years ago

Tried but got an error before running the code:

[node-haste] Encountered an error while persisting cache:
> SyntaxError: /Users/chen/repo/gist/Todolist/node_modules/immutable-devtools/before.png: Unexpected character '�' (1:0)
> > 1 | �PNG
>     | ^
>   2 | 
>   3 | 
>   4 | IHDR����
                EiCCPICC ProfileH
>     at Parser.pp.raise (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/parser/location.js:22:13)
>     at Parser.getTokenFromCode (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/tokenizer/index.js:561:12)
>     at Parser.readToken (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/tokenizer/index.js:180:21)
>     at Parser.<anonymous> (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/plugins/jsx/index.js:51:20)
>     at Parser.readToken (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/plugins/flow.js:155:22)
>     at Parser.nextToken (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/tokenizer/index.js:169:21)
>     at Parser.parse (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/parser/index.js:128:12)
>     at parse (/Users/chen/repo/gist/Todolist/node_modules/babylon/lib/index.js:47:47)
>     at File.parse (/Users/chen/repo/gist/Todolist/node_modules/babel-core/lib/transformation/file/index.js:517:34)
>     at File.parseCode (/Users/chen/repo/gist/Todolist/node_modules/babel-core/lib/transformation/file/index.js:603:20)
langpavel commented 8 years ago

Why image used only in documentation is parsed by tooling? Also this tool works only in Google Chrome console..

tiye commented 8 years ago

@langpavel React Native does use Chrome Devtools as React does https://facebook.github.io/react-native/docs/debugging.html#chrome-developer-tools

So the image is only in docs, also looks strange to me.

langpavel commented 8 years ago

Hmm, I'm not sure how to fix this...

tiye commented 8 years ago

I removed the images(as an experiment) and it stopped throwing errors. It does not work too. So React Native is running in a worker, maybe the separation of contexts breaks this module. image

langpavel commented 8 years ago

Support for window.devtoolsFormatters API is very vague. This can be issue too... (See #19 for example..)