Popular Articles

  • Redux Query Vs React Query (Dec 07, 2023)
  • Redux Saga Vs Redux Thunk Difference (Dec 07, 2023)
  • Redux-Thunk Vs Redux-Saga Which Is Better (Dec 07, 2023)
  • Redux And Local Storage (Dec 07, 2023)
  • Redux And Flux (Dec 07, 2023)

Redux Browser Extension

Switch to English

Table of Contents

Introduction

Features of the redux devtools extension, installation and setup, tips and tricks, common errors and solutions.

  • State Inspection: It allows you to inspect the current state of your application and how it changes over time.
  • Action Inspection: You can inspect the actions dispatched by your application, including the action type, payload, and the state before and after the action was dispatched.
  • Time Travel: This feature lets you jump to different points in time in your application's state history, essentially 'undoing' and 'redoing' actions.
  • Action Dispatching: You can manually dispatch actions to test how your application responds.
  • Filter Actions: If your application dispatches a lot of actions, the log can get crowded. You can filter actions by their types to focus on the actions you are interested in.
  • Preserve Log: By default, the extension clears its state when you refresh the page. You can prevent this by enabling the 'Persist State' option.

Redux Toolkit

The official, opinionated, batteries-included toolset for efficient Redux development

Includes utilities to simplify common use cases like store setup, creating reducers, immutable update logic , and more.

Opinionated

Provides good defaults for store setup out of the box , and includes the most commonly used Redux addons built-in .

Takes inspiration from libraries like Immer and Autodux to let you write "mutative" immutable update logic , and even create entire "slices" of state automatically .

Lets you focus on the core logic your app needs, so you can do more work with less code .

Other Libraries from the Redux Team

A predictable state container for JavaScript applications

React-Redux

Official React bindings for Redux

Redux Documentation

Loading Extensions in Your Code

  • March 15, 2014
  • Advanced / The Basics

Extensions are one of the most powerful features of Redux. Any part of Redux can be overloaded to do ANYTHING with extensions.

RUN BEFORE YOU CONFIG FILE

For extensions to work, you MUST run the extension loader and any config files BEFORE your options panel code. Otherwise it will not be applied. A limitation of WordPress hooks I fear. 😉

Getting Started

To make this easy as can be, we’ve setup a repo for our extensions loader. You can grab that code here: https://github.com/ReduxFramework/redux-extensions-loader

Even Easier

If you wanted to get started faster, use the Redux Generator found here: http://generate.reduxframework.com/ . It will generate for you code allowing you to start however you may need and also customize the function calls so you can sure you won’t have crossover with other devs.

Make a Custom Extension

You can make your own custom extension. In fact, if you want to change the way a Redux field does something, you should ALWAYS use an extension instead of modifying the core. We’ve set up a repo for that too. Grab it here: https://github.com/ReduxFramework/extension-boilerplate .

Related Articles

Using the ‘data’ argument, actions hooks, filter hooks, the redux api, support defined, ide snippets & templates.

Comments are closed.

View in English

Meet Safari Web Extensions on iOS

Safari extensions

Enhance and customize the web browsing experience on iPhone, iPad, and Mac with Safari extensions. Using powerful native APIs and frameworks, as well as familiar web technologies such as HTML, CSS, and JavaScript, you can easily create Safari extensions in Xcode and distribute them on the App Store in the Extensions category. Xcode 12 and later supports the popular WebExtension API and includes a porting tool to make it easy to bring your extensions to Safari.

Safari Web Extensions on MacOS, iPadOS, and iOS

Blocking content

Give users the ability to block certain content types on Safari iOS, iPadOS, and macOS. Built with Xcode, these app extensions are designed for speed and don’t slow down browsing. And because extensions never see what webpages users visit, user data is protected.

Learn about content blockers

Web extensions

Extend the web-browsing experience by allowing Safari to read and modify web page content. Now supported in iOS 15 and iPadOS 15, Safari web extensions are available on all Apple devices that support Safari. These extensions are built with Xcode and can communicate and share data with native apps — so you can integrate app content into Safari or send web data back to your app to create a unified experience.

Learn about Safari web extensions

Distributing and managing extensions

The Extensions category on the App Store for iPhone, iPad, and Mac showcases Safari extensions, with editorial spotlights and top charts to help people discover and download great extensions from the developer community. When your Safari extension is ready to be released, upload it to App Store Connect for distribution on the App Store. Apple reviews all extensions and updates to ensure they work reliably. Before submitting for review, make sure to read the guidelines for extensions .

Get started with App Store Connect

Converting extensions from other browsers

Web extensions that work in browsers other than Safari can be converted to support Safari on Apple platforms. Run the command-line web extension converter to create an Xcode project configured with a macOS app and/or iOS or iPadOS app that includes an extension that can be enabled in Safari.

Learn about converting a web extension for Safari

Upgrading macOS Safari web extensions to support iOS and iPadOS

It's easy to upgrade an existing macOS Safari web extension to also support iOS and iPadOS. Simply rerun your project through the command-line web extension converter tool with the --rebuild-project option. This will create a new Xcode project based on your existing project that includes extensions for these platforms.

# Using and Creating Extensions

Extensions are one of the most powerful features of Redux. Any part of Redux can be overloaded to do virtually anything with extensions.

Table of Contents

  • Loading an Extension
  • Redux::get_extensions()
  • Extension Folder Structure

WARNING: Extensions must be loaded BEFORE you use them

For best results, always load your extension before attempting to reference them in a config. Some extensions have custom APIs that will not be included and thus results may be poor. Always load extensions first, then use them.

# Loading an Extension

Using the Redux API, loading a single extension or a folder of extensions is simple.

That's it! Redux will recognize your extension(s) for your instance. You may then begin using their functionality in your config code.

If multiple extensions are in use, ensure they are loading properly in their own named folders within the specified directory to load them all.

# Fetching Extensions

Sometimes you need to fetch the existing extensions to identify what is being used.

# Redux::get_extensions()

This method requires one or two parameters depending on the desired return value.

# Fetching all Extensions

This returns an array of loaded extensions containing key/pair information of path (the path to the extension) and class (the classname of the extension). False is returned on failure.

# Fetching a Single Extension

Use the following to fetch the path of a single extension:

# Creating a Custom Extension

Creating your own extension is simple. In fact, to change the way a Redux field works, an extension solution is preferred to modifying the core code.

(opens new window) included in the sample folder.

# Extension Folder Structure

All extensions must follow a similar structure.

← Getting Help/Support Using TGM Plugin Activation →

Advisory boards aren’t only for executives. Join the LogRocket Content Advisory Board today →

LogRocket blog logo

  • Product Management
  • Solve User-Reported Issues
  • Find Issues Faster
  • Optimize Conversion and Adoption
  • Start Monitoring for Free

Redux DevTools: Tips and tricks for faster debugging

safari redux plugin

Redux is one of the most adopted state management libraries for large scale React applications. Besides its ability to make your application more predictable, the ecosystem that has evolved around it makes Redux the best solution for large scale applications. Another advantage of Redux is the developer tool that makes it easy to trace when, where, why, and how your application’s state has changed.

safari redux plugin

We will look into some extraordinary features that Redux DevTools offers that can help you debug your applications faster.

Tracing actions

Another amazing feature of Redux DevTools is to see the call stack that has triggered the action. We can select any action from history and see the cause of action.

tracing actions

For large scale applications where the same actions are triggered simultaneously from different parts of apps, it is hard to get to the root cause of action dispatch. Here is where the trace feature comes in handy for developers.

Redux DevTool allows developers to either use default implementation that relies on Error.stack() or define custom implementation. Here is the API to enable trace :

As seen, the trace argument also accepts methods. This method is called with every action. Developers can add custom implementation here to see the cause of action dispatch. Passing this method against trace property allows developers to monitor the trace of desired actions only.

This can help in keeping the development experience smooth and performant, as creating trace for every action might consume a lot of memory. The method as trace can be helpful for action dispatched via side effect libraries like redux-saga or other event listeners.

When not implementing a custom trace method, developers can rely on default implementation that uses Error.stack() API. In this case, traceLimit property is useful to manage memory usage of DevTool. It overrides browser defaults of Error.stackTraceLimit and limits the length of the stack for optimized memory consumption.

We don’t just write about Redux, we talk about it too. Listen now:

Or subscribe for later.

safari redux plugin

Tracing actions in the editors

Extending the ability to show trace of action, Redux DevTool allows you to navigate to the exact point of the codebase. For large codebases, this can be super handy, as it saves tons of useful time to navigate to the exact location in a large codebase.

The editor can be set from extension settings that are available at the bottom right of the DevTool.

tracing actions in the editors

Skipping actions

Time travel is one of the most powerful features of Redux DevTools, it allows us to see how our app’s state has reached the current point. In certain cases, to analyze application behavior, we might need to remove a particular action from the timeline. This is not possible within the time travel mechanism. Redux DevTool has a great way of doing it. Out of three different view types for your application’s flow, log monitor and inspector allows you to disable or remove an action from the timeline. Here is how it looks.

safari redux plugin

Over 200k developers use LogRocket to create better digital experiences

safari redux plugin

Jumping to action

Besides skipping state from timeline, developers can jump to a desired state without having to move through the timeline. This enables developers to quickly move around and see app’s output on different intermediary states. Developers can monitor the impact of jump in the timeline as well. This feature is only available with inspector mode.

jumping in action

Custom dispatch

Redux DevTool allows us to dispatch actions without writing any code. We can add our actions in dispatcher and it works just like action dispatched via Redux API. This kind of mocking helps in testing side effects and dependent actions. This feature becomes really handy when coupled with locking to the current state. We can lock state to a certain stage and dispatch action from DevTool to see the impact on store and monitor side effects.

custom dispatch

Allow/block actions

For large-scale applications consisting of a number of actions, we can monitor only desired actions; alternatively, we could block certain actions from appearing in the DevTools. This can be done by adding a list of actions to either block or allow in the DevTools settings or while initializing it in our applications.

As seen we can use the actionsBlacklist / actionsWhitelist parameters in an argument at initialization or do it via settings.

Disclaimer : We don’t encourage using any racist terminologies, regardless of intent; we have used these terms just to reference the API. Issue has been raised with the maintainer of this package, and we hope they will consider our request.

Persist store on page reload

One of the pain points in large scale applications is the development of interfaces for state that is derived after a journey within the app. It becomes even harder when some of the states depend on side effects, for example, network responses. DevTool comes to the rescue, we can persist certain states of ours across page reloads. This will allow you to jump directly to the desired state after reloading without going through the journey again.

persist

Using in production

It is very hard to predict or catch all possible bugs in our apps. We encounter a number of issues after our applications are live in production and are used by a large number of users. In order to analyze those bugs, we might need to see the trail of actions or current state of our application when the issue occurred. DevTool allows us to see a trail of actions and store in production as well, making it easier to reproduce issues.

For security and performance, it is highly recommended to use action and state sanitization options. Here is a blog post that looks at enabling DevTool in production.

Locking to the current state

The other benefit of locking is that we finally have a solution to avoid side effects.

Pin to sub state

In most production apps, state is divided in small sub state objects usually reflecting different modules in apps. Debugging cases might require focus on a particular sub state. For such cases, developers can pin to sub state and see how different actions impact this pinned sub state. Sub state can be pinned from Inspector & Chart modes .

Commit actions

For large scale applications, it is never easy to go through the list of hundreds of actions. Rather developers prefer to monitor the application in chunks. For such cases, Redux DevTool allows developers to commit the current set of actions. Current state is then considered as the initial state for upcoming actions. One of the best uses of this feature is monitoring state across page transitions.

Developers can commit state from Inspector mode but to Revert have to switch to log monitor.

Without a doubt, Redux DevTool is one of the most useful and powerful tools for debugging React applications. It allows developers to leverage predictability of application provided by Redux to the full extent. It is also available within the React Native debugger, which is why knowing it to a full extent can pace up our development and debugging on the web and mobile platforms simultaneously.

Get set up with LogRocket's modern React error tracking in minutes:

  • Visit https://logrocket.com/signup/ to get an app ID

Install LogRocket via npm or script tag. LogRocket.init() must be called client-side, not server-side

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Facebook (Opens in new window)

safari redux plugin

Stop guessing about your digital experience with LogRocket

Recent posts:.

Exploring The Aha Stack: Astro, Htmx, Alpine — A Complete Tutorial With A Demo Project And Comparison To Other Stacks

Exploring the AHA stack: Tutorial, demo, and comparison

The AHA stack — Astro, htmx, and Alpine — is a solid web development stack for smaller apps that emphasize frontend speed and SEO.

safari redux plugin

Comparing Hattip vs. Express.js for modern app development

Explore what Hattip is, how it works, its benefits and key features, and the differences between Hattip and Express.js.

safari redux plugin

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

safari redux plugin

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

safari redux plugin

3 Replies to "Redux DevTools: Tips and tricks for faster debugging"

Very good blog, Zain. The blog gives detailed information about Redux DevTools. Redux actions and states are explained nicely and are easy to understand. Redux can be used to debug applications. The tips provided in the blog are good and help to debug faster. Redux is a powerful debugging tool.

How do you unpin? I cant figure out how to unpin after mistakenly pinning!

If someone is still wondering. When yoy pin a prop you see it with the following format state > parentProp > pinnedProp . Just click in state in that to unpin the prop.

Leave a Reply Cancel reply

How-To Geek

How to sync a redux store across browser tabs.

Redux is a convenient way to manage state in complex web apps.

Quick Links

Synchronising your store, customised synchronisation, integrating with redux-persist.

Redux is a convenient way to manage state in complex web apps. Your Redux store isn't synced across tabs though, which can lead to some awkward scenarios. If the user logs out in one tab, it would be ideal for that action to be reflected in their other open tabs.

You can add cross-tab store synchronisation using the react-state-sync library. This provides a middleware which automatically syncs the store across tabs. You don't need to manually intervene in the sync process after the initial setup.

The Redux State Sync library offers a Redux middleware which you need to add to your store. When the store receives an action, the middleware will dispatch the same action in any other tabs open to your site.

Each tab sets up its own message listener to receive incoming action notifications. When the listener is notified, it will dispatch the action into the tab's store.

Messages are exchanged between tabs using the Broadcast Channel API . This is a browser feature which allows tabs from the same origin to communicate with each other. Tabs "subscribe" to "channels." They're notified by the browser when another tab posts a message to a subscribed channel.

Broadcast Channel is only available in newer browsers. Redux State Sync uses an abstraction which can fallback to alternative technologies. When Broadcast Channel is unsupported, IndexedDB or LocalStorage will be used instead.

The use of Broadcast Channel places some limitations on what you can send between tabs. Data you dispatch must be supported by the browser's structured clone algorithm . This includes scalar values, arrays, plain JavaScript objects and blobs. Complex values will not be transferred exactly.

To start using Redux State Sync, add it to your project via npm:

npm install redux-state-sync

Next, create a basic store. We'll modify this code in a moment to add Redux State Sync.

import {createStore} from "redux";

const state = {authenticated: false};

const reducer = (state, action) => ({...state, ...action});

const store = createStore(reducer, state);

Now we have a simple store. To sync it across tabs, add the Redux State Sync middleware and setup a message listener.

import {createStore, applyMiddleware} from "redux";

import {createStateSyncMiddleware, initMessageListener} from "redux-state-sync";

const reduxStateSyncConfig = {};

const store = createStore(

applyMiddleware(createStateSyncMiddleware(reduxStateSyncConfig))

initMessageListener(store);

The store is now ready to use across tabs. Open your site in two tabs. Dispatch an action in one of the tabs. You should see the action appear in both stores, effecting the corresponding state change in each. The Redux DevTools extension can be used to monitor incoming actions and the state changes they cause.

The state sync middleware is created using the createStateSyncMiddleware() utility function. This accepts a config object used to customise Redux State Sync's operation. We'll look more closely at this in the next section.

After the store is created, it's passed to initMessageListener() . This function ensures the cross-tab listening is configured. Without this call, tabs may not receive new actions if no action was dispatched on first load.

Using initMessageListener() won't give your tab access to the existing store held in another tab. When the user opens a new tab, it'll default to having its own fresh store. If you want new tabs to get their state from an open tab, use the initStateWithPrevTab() function instead.

const store = createStore(reducer, state, applyMiddleware(createStateSyncMiddleware({})));

initStateWithPrevTab(store);

The store's state will be replaced with the existing state if there's another open tab available.

Redux State Sync supports several configuration options to let you customise the synchronisation. Here's some of the most useful settings. Each one is set as a property in the config object passed to createStateSyncMiddleware() .

Excluding Actions

Sometimes you'll have actions which you don't want to synchronise. An example could be an action which causes a modal dialog to appear. Chances are you don't want this dialog to show up in all the user's open tabs!

You can exclude specific named actions using the blacklist option. Pass an array of action names as the value.

const config = {

blacklist: ["DEMO_ACTION"]

// This won't be synced to any other tabs

Store.dispatch({type: "DEMO_ACTION"});

You can also use a whitelist instead of a blacklist. Set the whitelist config option to allow only predefined actions to be synchronised.

Precisely Filtering Actions

If neither blacklist or whitelist give you enough control, set the predicate option. This accepts a function which is used to filter synchronisable actions.

predicate: action => (action.type !== "DEMO_ACTION")

The function will be invoked each time a new action is received. It'll receive the action as a parameter. The function should return true or false to indicate whether the action should be synchronised to other tabs. The example above will synchronise every action except DEMO_ACTION .

Broadcast Channel Settings

You can change the name of the Broadcast Channel by setting the channel property. It defaults to redux_state_sync . You shouldn't usually need to change this unless you want to have two separate synchronisation routines.

You can pass options to the Broadcast Channel abstraction library by setting broadcastChannelOption . This should be a configuration object accepted by the pubkey/broadcast-channel library .

You can use this to force a particular storage technology to be used. In this example, synchronisation will always occur via IndexedDB, even if the browser has native support for Broadcast Channels.

broadcastChannelOption: {type: "idb"}

You'll often want to use Redux State Sync in conjunction with Redux Persist. Redux Persist is a popular library which automatically persists your Redux store in the browser.

When using Redux Persist, you don't need to use Redux Persist's initStateWithPrevTab() function. Use initMessageListener() instead, as the initial state will always be the persisted state provided by Redux Persist.

Blacklist Redux Persist actions within your Redux State Sync configuration. These don't need to be synchronised across tabs. You should only sync changes that actually affect the store, rather than actions related to its lifecycle.

blacklist: ["persist/PERSIST", "persist/REHYDRATE"]

Redux State Sync lets you synchronise user actions across tabs. The applications are virtually boundless and are likely to improve the user experience. As users take actions on your site, they'll be immediately reflected in their other open tabs.

The "classic" use case is synchronising login and logout outcomes. There are other benefits too though, such as making incoming notifications available to all tabs, or synchronising client-side preferences like the user's selected UI theme.

The minified redux-state-sync library weighs in at 19KB. With setup consisting of just a few extra lines of code, you should consider adding Redux State Sync to your next project. It lets you link tabs together into a cohesive whole, instead of having them exist as independent entities.

Lead image for How to Use React DevTools in Safari

How to Use React DevTools in Safari

Published on Jun 09, 2023 in platforms by Lucien Chemaly 11 minute read

React is commonly used for the frontend in static site generators like Gatsby and now WordPress . React DevTools is a set of developer tools with a multitude of features that can make your workflow more efficient and help you debug and optimize your code.

However, if you use Safari, you may be disappointed to learn that there is no browser extension for React DevTools like there is in Chrome and Firefox.

Fortunately, there is a solution. You can still use standalone React DevTools to connect to your site in Safari. This practical tool is also useful for debugging non-browser-based React applications, like React Native apps. It can help simplify the process of optimizing and debugging your code, making your workflow more efficient.

In this article, you’ll learn how to install and use the standalone version of React DevTools to debug a React application running in Safari. In addition, the article also highlights the differences between the standalone version and the Chrome extension, as well as some limitations of the tools.

Use Cases for Debugging React Apps

The standalone version of React DevTools is a separate application that provides a powerful set of debugging and inspection tools for React applications. It’s independent of any specific browser and can be used across various platforms and environments. This makes it a versatile option for developers who need to debug their React apps in different contexts.

Some of the use cases for the standalone version of React DevTools include:

  • Debugging non-browser-based React apps: The standalone version of React DevTools is particularly useful when debugging React Native applications because it is platform-independent and can connect to apps running on iOS or Android devices. For example, you can use it to determine why a specific component of your React Native app isn’t rendering correctly on an iOS device. You can use React DevTools to inspect the component tree, check component props and state, and identify issues with styling or logic that may be causing the rendering problem.
  • Debugging React apps in Safari: Safari is a widely used browser, especially among macOS users. Although Safari has its own set of developer tools, it doesn’t have extensions or support for React applications like Chrome or Firefox. The standalone version of React DevTools can be used to debug React applications running in Safari, as it provides developers with a powerful set of tools to inspect components and diagnose issues. For instance, if a specific UI component in your React app doesn’t behave as expected when viewed in Safari, you can use React DevTools to inspect the component in question. You can check its state and props and identify any issues.
  • Debugging server-rendered React apps: In most static site generators, React apps are server-rendered, which means components are rendered on the server side and sent as HTML to the client. In these scenarios, the standalone version of React DevTools can help you debug issues related to server-rendered components. For example, if you’re using a solution like Next.js or React Server Components to perform server-side rendering, you can use the standalone version of React DevTools to inspect the rendered components and identify issues related to data fetching, state management, or rendering logic.

How to Debug a React App in Safari

The following tutorial explains how to use the standalone version of React DevTools to debug a React application running in Safari. By the end, you’ll be equipped with the knowledge and tools you need to confidently debug your React application.

Prerequisites

To complete this tutorial, you’ll need:

  • A Mac running Safari
  • A code editor, such as Visual Studio Code
  • Git installed on your machine
  • Node.js and npm (the Node package manager) installed on your system

To verify the installation of Node.js and npm, execute these commands in your shell or terminal:

If they aren’t installed, download and install Node.js , which also automatically installs npm. This tutorial uses Node version 18.12.1 and npm version 8.19.2.

Creating a React Demo Application

You’ll first need to set up a basic React demo application, which you’ll run and debug in your Safari browser using the standalone version of React DevTools.

Create a new React project using Create React App by executing this command:

This command will generate a new folder with the specified name and populate it with boilerplate code for a React application.

Change the current directory to your newly created project folder by running the following command:

Execute the following command to start the development server:

Your React application should now be live at http://localhost:3000/ . Use your Safari browser to open the application:

React demo application in Safari

Any modifications made to the source code will trigger an automatic page refresh.

Connecting Standalone React DevTools to Your App in Safari

To connect React DevTools to your app in Safari, you first need to install the standalone React DevTools package using npm from your terminal or shell:

Run React DevTools with this command:

After you run the command, you’ll get the following screen telling you to add an additional script to your React DOM :

React DevTools prompt

This tutorial uses the script with the localhost link ( <script src="http://localhost:8097"></script> ) to connect the React application, but the LAN IP address also works. Since you’re not working with a mobile application, the localhost link will work just fine.

Go to your source project and open the index.html file in the public folder. Add the localhost link just after the <head> tag, then open React DevTools. You should see the following in the Components section:

Debugging with standalone React DevTools

Creating a User Listing

Once you have connected React DevTools to your application, you can use the various features it provides. These features include the ability to inspect the component tree, examine component state and props, and profile component performance.

As the sample application doesn’t have many components, you’ll only see the App component in the tree. To explore more features of React DevTools, you’ll need to add more components.

To add a User component, create a file named User.js in the src folder and add the following code to it:

This component displays user information, such as first name, last name, age, and date of birth (DOB).

You’ll now create a UsersList component that utilizes the User component to display the list of users. Create a file named UsersList.js in the src folder and add the following code to it:

To populate the list of users, you need to create some dummy data and wrap the UsersList component in the App component. To do this, replace the code in App.js with the following:

Note: The App component renders the UsersList component, which in turn renders each User component for every user in the list.

The application in your Safari browser should look like the following:

React users list in Safari browser

Debugging and Inspecting Your App

Now that your application is ready, you can start debugging it with React DevTools.

If you open React DevTools, you should see your application tree. It begins with the App component at the top, followed by the UsersList component, and ends with the User component:

Application tree

If you click the UsersList component in the tree, the props that are passed to the component will be displayed in the right pane. In this case, the props include the array of users from your dummy data:

UsersList component

Clicking a User component displays the props that it passes (the user object in this case). You can click any of three User components and check their relative props:

User component

When you use React DevTools to debug your application, it’s important to understand the application tree and how it represents the component hierarchy. The application tree can help you quickly identify rendering issues and data flow by providing a visual representation of the components. You can inspect the props and state of each component to pinpoint bugs and troubleshoot issues that may arise.

Additionally, you can pin the location of a selected component in your browser by clicking the eye icon in React DevTools:

Pinning a component in React DevTools

Once this has been activated, it will highlight the component in light blue in your browser:

Selected component in the browser

You can also log the selected component in the console by clicking the bug icon in React DevTools:

Logging a component in React DevTools

The following image shows the results in the browser when you click the bug icon:

Logging a component in the browser

Using React DevTools, you can gain a better understanding of the structure and behavior of your applications. You can also more easily identify and fix bugs and performance issues. The standalone version is particularly useful because it can be used with any React application, whether it’s running locally or on a remote server, and it provides a separate, dedicated window for debugging purposes. Overall, the standalone version of React DevTools is a practical tool for developing and debugging React applications.

Differences between Standalone React DevTools and the Chrome Extension

If you use the standalone version of React DevTools, you’ll be able to use it with any browser, not just Safari. It also offers more customization options and flexibility compared to the Chrome extension. The following are some other differences between the two versions:

  • Cross-platform compatibility: The standalone version of React DevTools is designed to work across various platforms, including browsers and devices, enabling a broader range of debugging and development possibilities. Chrome extensions, on the other hand, are limited to working within the Chrome browser environment.
  • Ease of setup and connection: Chrome extensions are designed to integrate seamlessly with the browser, so using the extension version makes it easy to detect and connect to React apps running in the browser. The standalone version of React DevTools often requires manual configuration to connect to the target app, which can be more time-consuming and error-prone.
  • Updates and maintenance: These two versions of React DevTools may have different release schedules and update processes. Chrome extensions typically update automatically with the browser, while the standalone version may require manual updates.

Limitations of Standalone React DevTools

It’s also important to be aware that the standalone version of React DevTools has some limitations. For instance, the tool may not work as effectively with certain types of components, such as those built with third-party libraries. You may need to use additional tools or methods to gather the necessary information if the tool provides limited data.

The following are some of the most notable limitations:

  • Browser-specific features: The standalone version of React DevTools may lack some browser-specific features, such as network request inspection, JavaScript debugging, or browser performance profiling. For these features, developers need to use the browser’s built-in developer tools or rely on other debugging solutions tailored for the specific browser.
  • Integration with browser environment: The standalone version doesn’t have the same level of integration with the browser environment as the extensions. Certain tasks, like interacting with browser APIs or manipulating the DOM, may be more challenging or impossible to accomplish using the standalone version.
  • Learning curve: Due to differences in features, interface, and setup process, developers may need to invest additional time in learning how to use the standalone version of React DevTools. This may slow down their development process, especially if they are already familiar with the Chrome extension.
  • Performance and resource usage: The standalone version of React DevTools may have different performance characteristics and resource usage compared to the Chrome extension version. Depending on the specific tools and configurations used, developers may experience varying levels of performance and resource consumption, which can impact their development experience.

By keeping these limitations in mind, you can adjust your approach and optimize your code more effectively. For instance, you can use alternative tools or workarounds to gather the information you need.

The standalone version of React DevTools offers a versatile solution for developers who need a powerful and flexible set of debugging tools, whether they’re working on browser-based React apps or non-browser-based applications like React Native apps.

This article introduced the standalone version of React DevTools and demonstrated how to use it to debug a React app running in Safari. You should now be comfortable with setting up, connecting, and using React DevTools to inspect and debug your React applications. With the knowledge from this article, you’ll be able to debug your React applications, regardless of the environment or browser they are running in.

You can find the code that was used in this article in this GitHub repository .

Lucien Chemaly

By Lucien Chemaly

Lucien has a Master's and Engineering Degree in IT and Telecommunications from the University of Rennes, France. He teaches seasonal courses for engineering students at the Saint Joseph University of Beirut and has been involved in programming training for private companies. He also writes for Draft.dev.

The Technical Content Manager's Playbook

Build a Blog that Software Developers Will Read

The Technical Content Manager’s Playbook is a collection of resources you can use to manage a high-quality, technical blog:

  • A template for creating content briefs
  • An Airtable publishing calendar
  • A technical blogging style guide

safari redux plugin

Redux DevTools

Description.

Navigation Menu

Search code, repositories, users, issues, pull requests..., provide feedback.

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly.

To see all available qualifiers, see our documentation .

  • Notifications

A Safari extension for Redux

OKNoah/SafariReduxDevtoolsExtension

Folders and files, repository files navigation, safari redux devtools extension.

It's under major development , so please check back soon or make a pull request.

Screenshot

We've long wanted a Redux Devtools extension for the world's fastest browser!

As of now, this one simply uses an iframe to show remote-redux-devtools .

That means you'll need to set up your redux store something like this:

Don't worry, it's very flexible and more examples are in the readme .

It's limited to localhost domains for now as well.

  • JavaScript 99.5%

React Developer Tools

Use React Developer Tools to inspect React components , edit props and state , and identify performance problems.

You will learn

  • How to install React Developer Tools

Browser extension

The easiest way to debug websites built with React is to install the React Developer Tools browser extension. It is available for several popular browsers:

  • Install for Chrome
  • Install for Firefox
  • Install for Edge

Now, if you visit a website built with React, you will see the Components and Profiler panels.

React Developer Tools extension

Safari and other browsers

For other browsers (for example, Safari), install the react-devtools npm package:

Next open the developer tools from the terminal:

Then connect your website by adding the following <script> tag to the beginning of your website’s <head> :

Reload your website in the browser now to view it in developer tools.

React Developer Tools standalone

Mobile (React Native)

React Developer Tools can be used to inspect apps built with React Native as well.

The easiest way to use React Developer Tools is to install it globally:

Next open the developer tools from the terminal.

It should connect to any local React Native app that’s running.

Try reloading the app if developer tools doesn’t connect after a few seconds.

Learn more about debugging React Native.

Item logo image for Redux DevTools

Redux DevTools

700 ratings

Redux DevTools for debugging application's state changes.

The extension provides power-ups for your Redux development workflow. Apart from Redux, it can be used with any other architectures which handle the state. This is an open source project. See the official repository for more details: https://github.com/reduxjs/redux-devtools

4.6 out of 5 700 ratings Google doesn't verify reviews. Learn more about results and reviews.

Review's profile picture

Aastha Modanwal Apr 24, 2024

osm ! it's a very useful

Review's profile picture

Mohsin Rahman Apr 9, 2024

Review's profile picture

Anuj Singh Apr 5, 2024

Superb..... It's very helpful

  • Version 3.1.6
  • Updated December 13, 2023
  • Report a concern
  • Offered by Redux DevTools
  • Size 1.79MiB
  • Languages English
  • Developer Email [email protected]
  • Non-trader This developer has not identified itself as a trader. For consumers in the European Union, please note that consumer rights do not apply to contracts between you and this developer.

This developer declares that your data is

  • Not being sold to third parties, outside of the approved use cases
  • Not being used or transferred for purposes that are unrelated to the item's core functionality
  • Not being used or transferred to determine creditworthiness or for lending purposes

For help with questions, suggestions, or problems, visit the developer's support site

safari redux plugin

Node.js V8 --inspector Manager (NiM)

Manages DevTools with Node V8 Inspector (node --inspect) Debugging Workflow

safari redux plugin

Angular state inspector

Helps you debug Angular component state. Supports Angular 1/2+/Ivy!

safari redux plugin

Immutable.js Object Formatter

Makes Immutable JS objects more readable when they are logged to the console.

safari redux plugin

Allow CORS: Access-Control-Allow-Origin

Easily add (Access-Control-Allow-Origin: *) rule to the response header.

safari redux plugin

React Developer Tools

Adds React debugging tools to the Chrome Developer Tools. Created from revision b566064da on 4/15/2024.

safari redux plugin

React Context DevTool

Devtool for React Context and useReducer

safari redux plugin

JSON Formatter

Makes JSON easy to read. Open source.

safari redux plugin

Angular DevTools

Angular DevTools extends Chrome DevTools adding Angular specific debugging and profiling capabilities.

safari redux plugin

GraphQL developer tools

Devtools panel for GraphQL development

safari redux plugin

LocatorJS Chrome Extension - option-click to code (ReactJS)

safari redux plugin

React Performance Devtool

A devtool extension for inspecting the performance of React components.

safari redux plugin

Testing Playground

Simple and complete DOM testing playground that encourage good testing practices.

Troubleshooting

This is a place to share common problems and solutions to them. The examples use React, but you should still find them useful if you use something else.

Nothing happens when I dispatch an action ​

Sometimes, you are trying to dispatch an action, but your view does not update. Why does this happen? There may be several reasons for this.

Never mutate reducer arguments ​

It is tempting to modify the state or action passed to you by Redux. Don't do this!

Redux assumes that you never mutate the objects it gives to you in the reducer. Every single time, you must return the new state object. Even if you don't use a library like Immer , you need to completely avoid mutation.

Immutability is what lets react-redux efficiently subscribe to fine-grained updates of your state. It also enables great developer experience features such as time travel with redux-devtools .

For example, a reducer like this is wrong because it mutates the state:

It needs to be rewritten like this:

It's more code, but it's exactly what makes Redux predictable and efficient. If you want to have less code, you can use a helper like React.addons.update to write immutable transformations with a terse syntax:

Finally, to update objects, you'll need something like _.extend from Underscore, or better, an Object.assign polyfill.

Make sure that you use Object.assign correctly. For example, instead of returning something like Object.assign(state, newData) from your reducers, return Object.assign({}, state, newData) . This way you don't override the previous state .

You can also use the object spread operator proposal for a more succinct syntax:

Note that experimental language features are subject to change.

Also keep an eye out for nested state objects that need to be deeply copied. Both _.extend and Object.assign make a shallow copy of the state. See Updating Nested Objects for suggestions on how to deal with nested state objects.

Don't forget to call dispatch(action) ​

If you define an action creator, calling it will not automatically dispatch the action. For example, this code will do nothing:

TodoActions.js ​

Addtodo.js ​.

It doesn't work because your action creator is just a function that returns an action. It is up to you to actually dispatch it. We can't bind your action creators to a particular Store instance during the definition because apps that render on the server need a separate Redux store for every request.

The fix is to call dispatch() method on the store instance:

If you're somewhere deep in the component hierarchy, it is cumbersome to pass the store down manually. This is why react-redux lets you use a connect higher-order component that will, apart from subscribing you to a Redux store, inject dispatch into your component's props.

The fixed code looks like this:

You can then pass dispatch down to other components manually, if you want to.

Make sure mapStateToProps is correct ​

It's possible you're correctly dispatching an action and applying your reducer but the corresponding state is not being correctly translated into props.

Something else doesn't work ​

Ask around on the #redux Reactiflux Discord channel, or create an issue .

If you figure it out, edit this document as a courtesy to the next person having the same problem.

  • Nothing happens when I dispatch an action
  • Something else doesn't work

COMMENTS

  1. How do I access the redux store in Safari?

    In case you are using Nextjs framework, you can achieve this by opening the console in safari. Type window in it. Expand it. Now just check in the window object property. You will find a key something like '__REDUX' or something like that. In my case it was __NEXT_REDUX_STORE__.

  2. Why there's no Safari extension for this project? #435

    It would be great to have a plugin to inspect the redux state, actions and state diffs. 👍 15 JacopKane, Corasonn, olchyk98, mkusher, andresz74, jamie-ctm, joeyred, amlrJan2015, liesislukas, markvl91, and 5 more reacted with thumbs up emoji 😕 1 olchyk98 reacted with confused emoji

  3. GitHub

    This is a monorepo powered by pnpm and Nx. Install pnpm and run pnpm install to get started. Each package's dependencies need to be built before the package itself can be built. You can either build all the packages (i.e., pnpm run build:all) or use Nx commands to build only the packages necessary for the packages you're working on (i.e., pnpm nx build remotedev-redux-devtools-extension).

  4. About Extensions » Redux Documentation

    You do so with the following command: Redux::setExtensions( 'OPT_NAME', 'FULL PATH' ); Be sure to replace OPT_NAME with your opt_name and FULL PATH with the full path to your extension (s) location. This can be used to reference a single extension, or a folder of extensions. The choice of yours. A typical "extensions" directory would look ...

  5. A Safari implementation of chrome-react-redux.

    React Safari Redux. A set of utilities for building Redux applications in Safari extensions. This is the Safari implementation of react-chrome-redux. Designed to be used in Safari extensions built with the Safari Extension Builder. Currently supports linking the extension background and content/injected scripts.

  6. Guide to Redux DevTools Extension: Features, Installation, and Usage

    The Redux DevTools Extension is intended to be a development tool and you should ensure it is not included in your production build. In conclusion, the Redux DevTools Extension is a powerful tool that can greatly assist you in developing and debugging your Redux applications. By understanding its features and how to properly integrate it into ...

  7. Extensions

    Extensions. There are a number of free default extentions embedded within the Redux Core. These extensions all come pre-installed. SEE ALSO. Using & Creating Extensions. Edit this page on GitHub. Developer Documentation.

  8. Redux Toolkit

    Redux Toolkit. Getting Started Tutorials Usage Guide API RTK Query GitHub. Search. Redux Toolkit. The official, opinionated, batteries-included toolset for efficient Redux development. Get Started. Simple. Includes utilities to simplify common use cases like store setup, creating reducers, immutable update logic, and more.

  9. Redux DevTools for Safari 14? : r/reduxjs

    It would be amazing to get Redux / React dev tools in Safari to ditch Chrome, especially when relying on battery since it really makes a huge difference in battery life between Chrome and Safari nowadays. I use the stand alone react-devtools package. It took me a little bit of work to figure out how to include it in my webpack build, but then ...

  10. Loading Extensions in Your Code » Redux Documentation

    Extensions are one of the most powerful features of Redux. Any part of Redux can be overloaded to do ANYTHING with extensions. RUN BEFORE YOU CONFIG FILE. For extensions to work, you MUST run the extension loader and any config files BEFORE your options panel code. Otherwise it will not be applied. A limitation of WordPress hooks I fear. 😉

  11. Safari Extensions

    View forums. To distribute Safari Extensions, you need to be a member of the Apple Developer Program. You'll also get access to development resources for macOS, iOS, watchOS, and tvOS. Safari Extensions on the Mac App Store are compatible with Safari 10 or later running on OS X El Capitan or later. .

  12. Using Extensions

    Creating your own extension is simple. In fact, to change the way a Redux field works, an extension solution is preferred to modifying the core code. Try it yourself using our extension boilerplate (opens new window) included in the sample folder. # Extension Folder Structure. All extensions must follow a similar structure.

  13. Redux DevTools: Tips and tricks for faster debugging

    Very good blog, Zain. The blog gives detailed information about Redux DevTools. Redux actions and states are explained nicely and are easy to understand. Redux can be used to debug applications. The tips provided in the blog are good and help to debug faster. Redux is a powerful debugging tool.

  14. How to Sync a Redux Store Across Browser Tabs

    When using Redux Persist, you don't need to use Redux Persist's initStateWithPrevTab() function. Use initMessageListener() instead, as the initial state will always be the persisted state provided by Redux Persist. Blacklist Redux Persist actions within your Redux State Sync configuration. These don't need to be synchronised across tabs.

  15. How to Use React DevTools in Safari

    How to Use React DevTools in Safari. Published on Jun 09, 2023 in platforms by Lucien Chemaly 11 minute read React is commonly used for the frontend in static site generators like Gatsby and now WordPress. React DevTools is a set of developer tools with a multitude of features that can make your workflow more efficient and help you debug and optimize your code.

  16. Redux DevTools

    Redux DevTools for debugging application's state changes. The extension provides power-ups for your Redux development workflow. Apart from Redux, it can be used with any other architectures which handle the state. It's an opensource project.

  17. GitHub

    A Safari extension for Redux. Contribute to OKNoah/SafariReduxDevtoolsExtension development by creating an account on GitHub.

  18. React Developer Tools

    Mobile (React Native) React Developer Tools can be used to inspect apps built with React Native as well. The easiest way to use React Developer Tools is to install it globally: # Yarn. yarn global add react - devtools. # Npm. npm install - g react - devtools. Next open the developer tools from the terminal. react - devtools.

  19. My web app built with react doesn't run on safari browser

    The version I posted is the latest version as of this post and apparently will not work on safari once minified as when I built the code without the minfier it worked fine on safari. The version of Terser plugin I rolled back to is "terser-webpack-plugin": "4.2.3" . There maybe other version that works but this is the version that worked for me ...

  20. Redux DevTools

    Redux DevTools for debugging application's state changes. The extension provides power-ups for your Redux development workflow. Apart from Redux, it can be used with any other architectures which handle the state.

  21. Configuring redux to display on all browsers is not working correctly

    3. I followed the instructions over at the official docs; my app was working just fine in chrome, pointing to localhost:3000. However, now Im running into an issue, because it seems that if a browser doesnt have Redux extension, it won't work. According to the docs, I have written out: import { createStore, applyMiddleware, compose } from "redux";

  22. Troubleshooting

    Redux assumes that you never mutate the objects it gives to you in the reducer. Every single time, you must return the new state object. Even if you don't use a library like Immer, you need to completely avoid mutation. Immutability is what lets react-redux efficiently subscribe to fine-grained updates of your state.

  23. Home

    Redux was the first to implement the most advanced typography interface with Google Fonts. With Custom Fonts, your users can now upload any web font and enjoy seamless integration. ... Agencies can build multiple plugins that all interact with one another. With the hooks inside Redux you can alter, add, or even override full fields with a ...