immutable-devtools icon indicating copy to clipboard operation
immutable-devtools copied to clipboard

Any plan to work in React Native?

Open tiye opened this issue 9 years ago • 5 comments

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)

tiye avatar Jun 01 '16 09:06 tiye

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

langpavel avatar Jun 01 '16 09:06 langpavel

@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.

tiye avatar Jun 01 '16 10:06 tiye

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

langpavel avatar Jun 01 '16 10:06 langpavel

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

tiye avatar Jun 01 '16 10:06 tiye

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

langpavel avatar Jun 01 '16 10:06 langpavel