kurdin / console-remote

Remote JavaScript Console.Re Connector for Node.js and Browsers
http://console.re
MIT License
177 stars 26 forks source link

Should this work with a react app? #8

Open bilthon opened 5 years ago

bilthon commented 5 years ago

I have this create-react-app and was wondering if this solution would work on it.

kurdin commented 5 years ago

@bilthon

Yeah, I made some changes, now you can do this in your react or any app with webpack or other bundler:

do npm i console-remote-client

change your index.js

import React from 'react';
import { render } from 'react-dom';
import AppTodo from './AppTodo';
import registerServiceWorker from './registerServiceWorker';

import 'console-remote-client';

console.re.settings({
  channel: 'my-todo-logs'
});
// view remote logs at https://console.re/my-todo-logs

render(<AppTodo />, document.getElementById('root'));
registerServiceWorker();

visit https://console.re/my-todo-logs now you can load your app in browser and do: console.re.log('testing')

devdaddy commented 5 years ago

Anyway you have an example for loading into angular project? I already have it installed, I am having trouble getting it configured for my project.

ghost commented 4 years ago

Very helpfull. Please add info to "How to connect" on website!

image

Thanks!