SlideShare uma empresa Scribd logo
1 de 14
Baixar para ler offline
SAMSAO
Reactotron
A Debugging Agent
What is Reactotron?
So, the first question you might ask, is what is Reactotron exactly?

Let’s check this right now
What is Reactotron?
A desktop application (built using Electron)
A debugging agent
Plugin based
* A cross-platform desktop application available for Window, Linux and Mac

* Built using GitHub’s Electron. A framework to build cross-platform desktop application using JavaScript, HTML and CSS.

* For those who don’t know, it embeds Chromium web rendering engine, Node and V8 JavaScript engine

* Slack and Atom are other example applications built using Electron framework.

* Purpose of the tool is to aid debugging React JS/React Native application.

* Like inspecting your application state, check network traffic, inspect logs, etc.
How it works?
Before seeing what it can do for you, since we are all curious, let’s check how it works exactly.
How it works?
Client/Server architecture
React JS client
React Native client
Reactotron object to interact with server
* Reactotron is based a client/server architecture, where the desktop application is the server and your React JS/React Native application the client.

* The desktop application starts socket.io server listening on port 9090 (by default).

* React JS application, on initialization, create a client and connect to server on localhost hostname on port 9090.

* React Native application, once startup, create a client and connect to server on localhost.

* If on real device, you will need to configure the client to connect back to your computer’s IP.

* The Reactotron object is being used to “talk” to the server. In their demo app, they are hooking the object into console.tron.

* From the object, you can display stuff, log data, send screenshot, display benchmark info, etc.
What can you do with it?
* Now that we know what it is and how it works, let’s check you what you can do with it.

* For the following slides, I will first do the talk about the features and will demo them right after.
Redux State Management
Inspect dispatched actions and repeat them
Edit (or create from scratch) an action and dispatch
Monitor Redux store state
Redux store snapshots and replay
Supports Redux Saga
* Use the reactotron-redux plugin to connect Reactotron to your Redux store.

* Once configured, all disptached actions are visible in the event timeline.

* You can inspect the action details.

* You can repeat an existing action that was dispatched before.

* You can edit a previous action and dispatch back.

* You can store a snapshot of the current store and replay it later.

* It supports Redux Saga out of the box.
Reporting & Logging
Hook into error handler to display uncaught exceptions
Open in editor
Allow to log exception (reportError)
Allow to log stuff (log, debug, warn, error)
Allow to display random stuff
* On web, it hooks on window.onerror while on React Native, it hooks into an internal message called NativeModules.ExceptionsManager.updateExceptionMessage.
Once hooked up, it report all errors.

* Exceptions are displayed with their stacktraces (using Packager Symbolicate feature to use the source-map and transform the transpiled stacktrace into your own
source stacktrace).

* Similar to console feature, it’s possible to forward logging message to Reactotron using well-known .log, .warn, .debug and .error methods.

* The client also has a generic display method that can be used to display random objects. 

* Not limited to that, the display function is able to display screenshots! In react native, using react-native-view-shot, it’s possible to see the screenshot in the desktop
directly.
Networking
Integrate into ApiSauce
Inspect request/response headers
Inspect request/response body
* Reactotron as support for APISauce, a thin wrapper library around Axios.

* The plugin hooks into axios request pipeline and forward everything to Reactotron desktop application.

* For each request/response, it’s possible to inspect the request headers & body and the same thing for the response.
Miscellaneous
Overlay an image over a component
AsyncStorage tracking
* It’s possible to overlay an image over a component.

* This feature is cool for example when doing layout of a screen.

* However, it’s intrusive as you must us an higher-order component and wrap your own component with it, a bit like Redux connect does.

* Reactotron also has AsyncStorage support. You view async storage audit in the desktop application directly.
Conclusion
* It a nice tool already really useful.

* Still some rough edges in the user experience

* JSON errors when editing action does not display errors

* Some actions are not clear (press to delete)

* Missing features

* More integrations

* Inspect actual state

* View react tree + props + state
QUESTIONS?
THANK YOU!

Mais conteúdo relacionado

Mais procurados

Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareVisual Engineering
 
Modern Web Developement
Modern Web DevelopementModern Web Developement
Modern Web Developementpeychevi
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Ross Dederer
 
Ryan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was GoodRyan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was GoodFITC
 
Introduction to RxJava on Android
Introduction to RxJava on AndroidIntroduction to RxJava on Android
Introduction to RxJava on AndroidChris Arriola
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6William Marques
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScriptAmitai Barnea
 
OttawaJS - React
OttawaJS - ReactOttawaJS - React
OttawaJS - Reactrbl002
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Hsuan Fu Lien
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit TestingEswara Kumar Palakollu
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOFVivian Farrell
 
Creating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with ReactCreating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with Reactpeychevi
 
Testing React hooks with the new act function
Testing React hooks with the new act functionTesting React hooks with the new act function
Testing React hooks with the new act functionDaniel Irvine
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today Nitin Tyagi
 
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Marcin Mieszek
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in JavaYakov Fain
 

Mais procurados (20)

Workshop 22: React-Redux Middleware
Workshop 22: React-Redux MiddlewareWorkshop 22: React-Redux Middleware
Workshop 22: React-Redux Middleware
 
Modern Web Developement
Modern Web DevelopementModern Web Developement
Modern Web Developement
 
Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2 Migrating an application from Angular 1 to Angular 2
Migrating an application from Angular 1 to Angular 2
 
Ryan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was GoodRyan Christiani I Heard React Was Good
Ryan Christiani I Heard React Was Good
 
Introduction to RxJava on Android
Introduction to RxJava on AndroidIntroduction to RxJava on Android
Introduction to RxJava on Android
 
Workshop React.js
Workshop React.jsWorkshop React.js
Workshop React.js
 
RxJava@Android
RxJava@AndroidRxJava@Android
RxJava@Android
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScript
 
OttawaJS - React
OttawaJS - ReactOttawaJS - React
OttawaJS - React
 
NInject - DI Container
NInject - DI ContainerNInject - DI Container
NInject - DI Container
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
 
Scaling React and Redux at IOOF
Scaling React and Redux at IOOFScaling React and Redux at IOOF
Scaling React and Redux at IOOF
 
Creating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with ReactCreating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with React
 
Testing React hooks with the new act function
Testing React hooks with the new act functionTesting React hooks with the new act function
Testing React hooks with the new act function
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
 
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
Mobx for Dummies - Yauheni Nikanowich - React Warsaw #5
 
React.js+Redux Workshops
React.js+Redux WorkshopsReact.js+Redux Workshops
React.js+Redux Workshops
 
Reactive Thinking in Java
Reactive Thinking in JavaReactive Thinking in Java
Reactive Thinking in Java
 

Semelhante a Reactotron - A Debugging Agent

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react jsStephieJohn
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Fwdays
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
React gsg presentation with ryan jung & elias malik
React   gsg presentation with ryan jung & elias malikReact   gsg presentation with ryan jung & elias malik
React gsg presentation with ryan jung & elias malikLama K Banna
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrAfreenK
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptJohn Stevenson
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !Ritesh Kumar
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Previewvaluebound
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryjanet736113
 
What are the components in React?
What are the components in React?What are the components in React?
What are the components in React?BOSC Tech Labs
 
React js programming concept
React js programming conceptReact js programming concept
React js programming conceptTariqul islam
 
How to create components in react js
How to create components in react jsHow to create components in react js
How to create components in react jsBOSC Tech Labs
 

Semelhante a Reactotron - A Debugging Agent (20)

Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"Philip Shurpik "Architecting React Native app"
Philip Shurpik "Architecting React Native app"
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
React gsg presentation with ryan jung & elias malik
React   gsg presentation with ryan jung & elias malikReact   gsg presentation with ryan jung & elias malik
React gsg presentation with ryan jung & elias malik
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrr
 
react-slides.pptx
react-slides.pptxreact-slides.pptx
react-slides.pptx
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
 
Using wikto
Using wiktoUsing wikto
Using wikto
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
ReactJS.pptx
ReactJS.pptxReactJS.pptx
ReactJS.pptx
 
react-slides.pdf
react-slides.pdfreact-slides.pdf
react-slides.pdf
 
react-slides.pdf gives information about react library
react-slides.pdf gives information about react libraryreact-slides.pdf gives information about react library
react-slides.pdf gives information about react library
 
What are the components in React?
What are the components in React?What are the components in React?
What are the components in React?
 
React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
How to create components in react js
How to create components in react jsHow to create components in react js
How to create components in react js
 
Intro to React
Intro to ReactIntro to React
Intro to React
 

Último

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Reactotron - A Debugging Agent

  • 3. What is Reactotron? So, the first question you might ask, is what is Reactotron exactly? Let’s check this right now
  • 4. What is Reactotron? A desktop application (built using Electron) A debugging agent Plugin based * A cross-platform desktop application available for Window, Linux and Mac * Built using GitHub’s Electron. A framework to build cross-platform desktop application using JavaScript, HTML and CSS. * For those who don’t know, it embeds Chromium web rendering engine, Node and V8 JavaScript engine * Slack and Atom are other example applications built using Electron framework. * Purpose of the tool is to aid debugging React JS/React Native application. * Like inspecting your application state, check network traffic, inspect logs, etc.
  • 5. How it works? Before seeing what it can do for you, since we are all curious, let’s check how it works exactly.
  • 6. How it works? Client/Server architecture React JS client React Native client Reactotron object to interact with server * Reactotron is based a client/server architecture, where the desktop application is the server and your React JS/React Native application the client. * The desktop application starts socket.io server listening on port 9090 (by default). * React JS application, on initialization, create a client and connect to server on localhost hostname on port 9090. * React Native application, once startup, create a client and connect to server on localhost. * If on real device, you will need to configure the client to connect back to your computer’s IP. * The Reactotron object is being used to “talk” to the server. In their demo app, they are hooking the object into console.tron. * From the object, you can display stuff, log data, send screenshot, display benchmark info, etc.
  • 7. What can you do with it? * Now that we know what it is and how it works, let’s check you what you can do with it. * For the following slides, I will first do the talk about the features and will demo them right after.
  • 8. Redux State Management Inspect dispatched actions and repeat them Edit (or create from scratch) an action and dispatch Monitor Redux store state Redux store snapshots and replay Supports Redux Saga * Use the reactotron-redux plugin to connect Reactotron to your Redux store.
 * Once configured, all disptached actions are visible in the event timeline. * You can inspect the action details. * You can repeat an existing action that was dispatched before. * You can edit a previous action and dispatch back. * You can store a snapshot of the current store and replay it later. * It supports Redux Saga out of the box.
  • 9. Reporting & Logging Hook into error handler to display uncaught exceptions Open in editor Allow to log exception (reportError) Allow to log stuff (log, debug, warn, error) Allow to display random stuff * On web, it hooks on window.onerror while on React Native, it hooks into an internal message called NativeModules.ExceptionsManager.updateExceptionMessage. Once hooked up, it report all errors. * Exceptions are displayed with their stacktraces (using Packager Symbolicate feature to use the source-map and transform the transpiled stacktrace into your own source stacktrace). * Similar to console feature, it’s possible to forward logging message to Reactotron using well-known .log, .warn, .debug and .error methods. * The client also has a generic display method that can be used to display random objects. * Not limited to that, the display function is able to display screenshots! In react native, using react-native-view-shot, it’s possible to see the screenshot in the desktop directly.
  • 10. Networking Integrate into ApiSauce Inspect request/response headers Inspect request/response body * Reactotron as support for APISauce, a thin wrapper library around Axios. * The plugin hooks into axios request pipeline and forward everything to Reactotron desktop application. * For each request/response, it’s possible to inspect the request headers & body and the same thing for the response.
  • 11. Miscellaneous Overlay an image over a component AsyncStorage tracking * It’s possible to overlay an image over a component. * This feature is cool for example when doing layout of a screen. * However, it’s intrusive as you must us an higher-order component and wrap your own component with it, a bit like Redux connect does. * Reactotron also has AsyncStorage support. You view async storage audit in the desktop application directly.
  • 12. Conclusion * It a nice tool already really useful. * Still some rough edges in the user experience * JSON errors when editing action does not display errors * Some actions are not clear (press to delete)
 * Missing features * More integrations * Inspect actual state
 * View react tree + props + state