sidorares / react-x11

React renderer with X11 as a target
MIT License
239 stars 22 forks source link

Guide on how to start experimenting with the library #8

Closed AleksanderKoko closed 7 years ago

AleksanderKoko commented 7 years ago

Hi, guys. Congrats on this project, an interesting one. However, I had problems getting it running.

I tried to babel a file (turn on something Node can execute), but no success. Did node simple.js after turned to normal JS, but no luck. It might be only my case because I'm not tech savvy on Node in general.

phil-r commented 7 years ago

Hello @AleksanderKoko I've also wanted to play with this lib, and that how I've managed to make it work:

to run other examples you'll need babel-node which is no longer a part of babel, but a part of babel-cli... or you can clone my fork and follow this instructions

Anyway I wasn't able to achieve the same result as on gif in Readme

sidorares commented 7 years ago

@phil-r feel free so send pr with updated documentation, very keen to improve since this library started to get some attention and it's no longer just me

sidorares commented 7 years ago

oops I see you already did

sidorares commented 7 years ago

@phil-r have you tried running react-devtools? It's standalone electron app, ./node_modules/.bin/react-devtools. Will add more to readme later today, on mobile now

phil-r commented 7 years ago

@sidorares no, I haven't figured out how to use them, will try later ;)

sidorares commented 7 years ago

just starting https://npmjs.org/package/react-devtools should be enough, no additional configuration required

AleksanderKoko commented 7 years ago

Hey @phil-r and @sidorares . Thanks for the fast response. Tried again and it looks I did something similar on my last attempt. Again no new window when executing the commands (here also on docs) seems to pop up.

Here's one screenshot on my case. Am I missing something, or is not working only for me?

screen shot 2017-06-12 at 09 32 18
AleksanderKoko commented 7 years ago

If this tool helps to build products less memory/cpu intensive than Electron, I really would like to help :D

sidorares commented 7 years ago

Internally it's using node-x11 to communicate with X Server. You can try first to play with examples from node-x11. Note that osx no longer ships x server by with os, you need to install it manually - https://www.xquartz.org/

If this tool helps to build products less memory/cpu intensive than Electron

Yes, this is one of the goals, apps like https://getkap.co/ - not extremely complicated UI, should not take hundreds of MBs on disk and in memory (not blaming Kap here - it's a great app)

sidorares commented 7 years ago

@AleksanderKoko what happens if you just type xeyes or xterm command in your terminal?

AleksanderKoko commented 7 years ago

Now it works. Didn't know had to install that software. Would play a bit with this project and come back with stuff :)

AleksanderKoko commented 7 years ago

I think we can close this issue now @sidorares . From activity monitor, I can see it's not that intensive. Tried React Mac before and it was intensive surprisingly.