Redux is a predictable state container for JavaScript apps.
It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger.
You can use Redux together with React, or with any other view library. It is tiny (2kB, including dependencies), but has a large ecosystem of addons available.
Installation#
See full list on wordpress.org. Bootredux is an elegant WordPress theme based on Bootstrap v4 and Underscores by Automattic. Premium version download! Email info@reduxthemes.com for support and instant access to the premium version of the.
Redux Toolkit#
Redux Toolkit is our official recommended approach for writing Redux logic. It wraps around the Redux core, and contains packages and functions that we think are essential for building a Redux app. Redux Toolkit builds in our suggested best practices, simplifies most Redux tasks, prevents common mistakes, and makes it easier to write Redux applications.
RTK includes utilities that help simplify many common use cases, including store setup,creating reducers and writing immutable update logic,and even creating entire 'slices' of state at once.
Whether you're a brand new Redux user setting up your first project, or an experienced user who wants tosimplify an existing application, Redux Toolkit can help youmake your Redux code better.
Redux Toolkit is available as a package on NPM for use with a module bundler or in a Node application:
Create a React Redux App#
The recommended way to start new apps with React and Redux is by using the official Redux+JS template for Create React App, which takes advantage of Redux Toolkit and React Redux's integration with React components.
Redux Core#
The Redux core library is available as a package on NPM for use with a module bundler or in a Node application:
It is also available as a precompiled UMD package that defines a window.Redux
global variable. The UMD package can be used as a <script>
tag directly.
For more details, see the Installation page.
Basic Example#
The whole global state of your app is stored in an object tree inside a single store.The only way to change the state tree is to create an action, an object describing what happened, and dispatch it to the store.To specify how state gets updated in response to an action, you write pure reducer functions that calculate a new state based on the old state and the action.
Instead of mutating the state directly, you specify the mutations you want to happen with plain objects called actions. Then you write a special function called a reducer to decide how every action transforms the entire application's state.
In a typical Redux app, there is just a single store with a single root reducing function. As your app grows, you split the root reducer into smaller reducers independently operating on the different parts of the state tree. This is exactly like how there is just one root component in a React app, but it is composed out of many small components.
This architecture might seem like a lot for a counter app, but the beauty of this pattern is how well it scales to large and complex apps. It also enables very powerful developer tools, because it is possible to trace every mutation to the action that caused it. You can record user sessions and reproduce them just by replaying every action.
Redux Toolkit Example#
Redux Toolkit simplifies the process of writing Redux logic and setting up the store. With Redux Toolkit, that same logic looks like:
Redux Toolkit allows us to write shorter logic that's easier to read, while still following the same Redux behavior and data flow.
Learn Redux#
We have a variety of resources available to help you learn Redux.
Redux Essentials Tutorial#
The Redux Essentials tutorial is a 'top-down' tutorial that teaches 'how to use Redux the right way', using our latest recommended APIs and best practices. We recommend starting there.
Redux Fundamentals Tutorial#
The Redux Fundamentals tutorial is a 'bottom-up' tutorial that teaches 'how Redux works' from first principles and without any abstractions, and why standard Redux usage patterns exist.
Additional Tutorials#
- The Redux repository contains several example projects demonstrating various aspects of how to use Redux. Almost all examples have a corresponding CodeSandbox sandbox. This is an interactive version of the code that you can play with online. See the complete list of examples in the Examples page.
- Redux creator Dan Abramov's free 'Getting Started with Redux' video series and Building React Applications with Idiomatic Redux video courses on Egghead.io
- Redux maintainer Mark Erikson's 'Redux Fundamentals' conference talk and 'Redux Fundamentals' workshop slides
- Dave Ceddia's post A Complete React Redux Tutorial for Beginners
Other Resources#
- The Redux FAQ answers many common questions about how to use Redux, and the 'Recipes' docs section has information on handling derived data, testing, structuring reducer logic, and reducing boilerplate.
- Redux maintainer Mark Erikson's 'Practical Redux' tutorial series demonstrates real-world intermediate and advanced techniques for working with React and Redux (also available as an interactive course on Educative.io).
- The React/Redux links list has categorized articles on working with reducers and selectors, managing side effects, Redux architecture and best practices, and more.
- Our community has created thousands of Redux-related libraries, addons, and tools. The 'Ecosystem' docs page lists our recommendations, and there's a complete listing available in the Redux addons catalog.
Help and Discussion#
The #redux channel of the Reactiflux Discord community is our official resource for all questions related to learning and using Redux. Reactiflux is a great place to hang out, ask questions, and learn - come join us!
You can also ask questions on Stack Overflow using the #redux tag.
If you have a bug report or need to leave other feedback, please file an issue on the Github repo
Should You Use Redux?#
Redux is a valuable tool for organizing your state, but you should also consider whether it's appropriate for your situation. Don't use Redux just because someone said you should - take some time to understand the potential benefits and tradeoffs of using it.
Here are some suggestions on when it makes sense to use Redux:
- You have reasonable amounts of data changing over time
- You need a single source of truth for your state
- You find that keeping all your state in a top-level component is no longer sufficient
For more thoughts on how Redux is meant to be used, see:
Description
Redux – Quickly create full pages in WordPress’ Gutenberg
Supercharge the Gutenberg editor with our ever-growing library of WordPress Blocks and templates. Discover what’s possible and implement any design on your website in virtually no time at all.
Worried that our templates may not work with your theme? We’ve got you covered. With our custom page templates option you can override any theme. Missing a plugin a template needs? No worries, we’ll even help you install what you need, all from the Gutenberg editor.
Don’t waste hours trying to recreate a template you love. With a click of a button it is own website where you can start customizing it for your needs.
♥️ What the Plugin does?
- Browse 1,000+ templates from your Gutenberg Editor that you can add to your site immediately.
- Preview each Gutenberg block based template in the customizer preview.
- Filter between the dependencies you want, and find exactly what you’re looking for.
- See instantly which Gutenberg templates you have everything for, or may need to install some dependencies.
- Automated install of anything you may need to install any template.
- Block Patterns library support built in.
- Make the Reusable Blocks visible in our library modal window. 😉
- The most trusted option framework in the industry.
- Developer friendly: clean code, inline documentation
🚀 TYPICAL USE CASE OF THIS PLUGIN
You are building a big site with lots of pages and you just want it to look amazing. With Redux you can begin making pages with a variety of “starter blocks,” or templates.
You can browse through the categories, as well as collections of like-styled pages. When you find something you like, Redux makes sure you have everything you need. If a dependency (or required plugin) is missing, you are notified and can install the missing dependency. Worried that our templates may not work with your theme? No problem! With our custom page templates
options you can transform any site into exactly what you want it to be no matter what them you are using.
Don’t waste hours trying to recreate a design you love. With a click of a button, you have it on your own site and you can begin customizing your “starter block” for your needs.
🎉 Supported Page Builders
Currently Redux supports only the Gutenberg / Block Editor of WordPress 5.0+.
🎨 Supported Themes
Though Redux will work with any theme that uses Gutenberg, we have done extra work to ensure complete compatibility with these themes.
- Astra Theme with Astra Pro Add-On Plugin – Custom Layouts (for Layouts, Headers, Footers, Hooks)
- GeneratePress Theme with GP Premium Add-On Plugin – Elements (for Layouts, Headers, Hooks)
- OceanWP Theme with Ocean Extra free Add-On Plugin – My Library (for Layouts, Hooks etc.)
- Kava Pro Theme/ CrocoBlock Service with JetThemeCore Plugin – My Library (for Layouts, Pages, Headers, Footers, Single, Archive)
- Genesis Framework with Genesis Child Themes — via Blox Lite and Blox (Pro) Plugins – Global Content Blocks (for Sections, Hooks)
- Page Builder Framework with WPBF Premium Add-On Plugin – Custom Section (for Sections, Layouts, Hooks etc.)
- Customify with Customify Pro Add-On Plugin – Hooks (for Layouts, Sections, Hooks etc.)
- Suki with Suki Pro Add-On Plugin – Custom Blocks (for Layouts, Sections, Hooks etc.)
- Neve with Neve Pro Add-On Plugin – Custom Layouts (for Layouts, Sections, Hooks etc.)
- Woostify with Woostify Pro Add-On Plugin – Header Footer Builder (for Elementor theming areas – Headers/ Footers)
- Avada Theme with Avada Fusion Builder – Library (for Templates, Pages, Layouts, Columns, Rows)
- Divi Theme with Divi Builder – Library (for Templates etc.)
- Extra Theme with Divi Builder – Library (for Templates etc.) – Category Templates (for Layouts, Templates etc.)
📦 Supported Gutenberg-Specific Plugins (Block Editor)
- Gutenberg Plugin – Gutenberg (Bleeding-Edge development in Gutenberg and Gutenberg Blocks)
- ACF Blocks Suite Plugin – Blocks (Fields for Gutenberg Blocks)
- Advanced Gutenberg Blocks Plugin – Blocks (Blocks and Tools for Gutenberg Blocks)
- Atomic Blocks – Gutenberg Blocks Collection Plugin – Blocks (Blocks for Gutenberg Blocks)
- Gutenberg Page Building Toolkit – EditorsKit Plugin – Blocks (Templates & Fields for Gutenberg Blocks)
- WordPress Slider Plugin – Block Slider Plugin – Blocks (Blocks for Gutenberg Blocks)
- Page Builder Gutenberg Blocks – CoBlocks Plugin – Blocks (Blocks for Gutenberg Blocks)
- Gutenberg Page Building Toolkit – EditorsKit Plugin – Blocks (Blocks tools to supercharge the Gutenberg editor)
- Gutenberg Page Builder Toolkit – EditorPlus Plugin – EditorPlus (Toolkit and blocks for Gutenberg Blocks)
- WordPress Form Builder Plugin – Gutenberg Forms Plugin – Blocks (Blocks & Forms for Gutenberg Blocks)
- Getwid – Gutenberg Blocks Plugin – Blocks (Templates & Blocks for Gutenberg Blocks)
- Gutenberg Blocks – Gutentor Page Builder for Gutenberg Editor Plugin – Blocks (Gutenberg Blocks)
- Kadence Blocks – Gutenberg Page Builder Toolkit Plugin – Blocks (Blocks for Gutenberg Blocks)
- Page Builder Gutenberg Blocks – Kioken Blocks Plugin – Blocks & Templates (Blocks for Gutenberg Blocks)
- Gutenberg Blocks and Template Library by Otter Plugin – Blocks & Templates (Blocks and Templates for Gutenberg Blocks)
- Gutenberg Blocks and Page Builder – Qubely Plugin – Blocks & Templates (Templates & Blocks for Gutenberg Blocks)
- Gutenberg Blocks Collection – qodeblock Plugin – Blocks (Blocks for Gutenberg Blocks)
- Stackable – Page Builder Gutenberg Blocks Plugin – Blocks & Templates (Templates & Blocks for Gutenberg Blocks)
- Ultimate Blocks – Gutenberg Blocks Plugin Plugin – Blocks (Blocks for Gutenberg Blocks)
- Gutenberg Blocks – Ultimate Addons for Gutenberg Plugin – Blocks (Blocks for Gutenberg Blocks)
☀️ Supported Gutenberg-Specific Services / Websites
- GutenbergHub.com – GutenbergHub GutenbergHub is a one-stop resource for you need to work with Gutenberg WordPress editor.
- ShareABlock by EditorsKit – ShareABlock Community submitted free block designs and templates for Gutenberg
👍 BE A CONTRIBUTOR
If you want to translate, go to the Translation Portal at translate.wordpress.org.
You can also contribute code-wise via our GitHub Repository – and see where you can help. Be sure to use our develop branch to submit pull requests.
📝 Documentation and Support
- For more information about features, FAQs and documentation, check out our website at Redux.
- If you have any more questions, visit our support on the Plugin’s Forum.
⚡ Like the Redux Plugin?
- Follow us on Facebook 💬
- Rate us 5 ⭐ stars on WordPress.org
- Become a Sponsor 💜 and support ongoing development, maintenance and support of this plugin
- Follow us on Twitter 🐦: @ReduxFramework and @DovyP
🔐 Privacy
Redux does not interact with end users on your website. Our templates will continue to work even if Redux is uninstalled. If a product is using Redux the option panel will cease to function without Redux.
Redux utilizes AppSero for account management as well as to enable our premium offerings. You can find their privacy policy here: https://appsero.com/privacy-policy/. Activation of Redux is not necessary, but additional features such as Google Font Updates and increased access to the template library will be limited.
The Redux plugin uses a custom API to fetch our content library and our Gutenberg templates. To improve the service and stability we store logs which may or may not contain the following:
- browser type
- referring site
- date and time of request
- template ID requested
- date of cached version of the given API request
- supported block plugins installed (slug only, no versions)
- version of Redux installed
- Redux API keys
API requests are only made when a user clicks on the Library button, launches the Redux Challenge, or opts into Google Font updates.
For more details on our privacy policy: https://redux.io/privacy
For more details on on our terms and conditions: https://redux.io/terms
4.1.26
- Added: Menu accent introduced in WordPress 5.7.
- Updated: ACE Editor 1.4.12.
- Updated select2 to support cssContainer.
- Fixed: Multiple submenus in metaboxes; the last submenu it cut off.
- Fixed: Fatal error: Can’t use function return value in write context.
- Fixed: PHP 8.0 deprecation warnings.
- Fixed: Malformed HTML causing Redux pro alpha color-picker to not render.
- Fixed: IMproved class checks for Redux Pro.
- Fixed: jQuery 3.x deprecation notices.
- Fixed: Malformed SCSS.
- Release date: March 17, 2021
4.1.25
- Fixed: Erroneous icon on button_set field after WP 5.6 update.
- Fixed: Erroneous icon on palette field after WP 5.6 update.
- Fixed: PHP error in init_delay function during heartbeat API.
- Fixed: Options object field not rendering.
- Release date: Jan 21, 2021
4.1.24
- Fixed: Select2 callback fix for select fields.
- Added: Shim: empty field_*.php files to fix developers including files improperly.
- Fixed: Changed use of ctype_xdigit to account for hosts where it’s disabled.
- Added: Shim for people using terms data key, but using taxonomies instead of taxonomy.
- Fixed: Static call mismatch in redux colors.
- Fixed: CSRF security issue with a flipped if conditional. Thanks @ErwanLR.
- Fixed: WordPress 4.6 API warnings.
- Fixed: WordPress 4.6 customizer issue where fields not displaying properly.
- Fixed: Massive speed improvement to the library.
- Fixed: Pro template count error if previously activated and Redux Pro not enabled.
- Release date: Dec 12, 2020
4.1.23
- Fixed: Massive speed improvement to the library.
- Fixed: Pro template count error if previously activated and Redux Pro not enabled.
- Release date: Oct 24, 2020
4.1.22
- Fixed: Menu locations WordPress data object not providing name.
- Added: Undefined if menu location is not assigned to a menu.
- Fixed: Another import/export edge case.
- Fixed: Fix setField API value.
- Fixed: Older extension compatibility.
- Fixed: Text field error with data/options args not displaying properly.
- Fixed: Import/Export now properly respects order of objects. Now using PHP over JS json_encode.
- Release date: Oct 23, 2020
4.1.21
- Fixed: Fixed connection banner to hide even if JS is broken by jQuery migrate issue (WP 5.5).
- Fixed: Resolved all remaining legacy extension compatibility issues.
- Fixed: Custom callback with select field.
- Fixed: Typography bug when style was hidden.
- Fixed: Issue with text labels.
- Fixed: Google fonts html validation issues.
- Added: Feedback modal.
- Fixed: Import logic flaw.
- Fixed: Security bug. Thanks @lenonleite of www.lenonleite.com.br.
- Release date: Oct 08, 2020
4.1.20
- Added: Properly adjust the blocked editor page width based on template selected.
- Added: Broke out third-party premium plugins for filtering to help with understanding of what comes with Redux Pro.
- Added: Update block editor width when selecting a Redux template.
- Fixed: Some styling issues with preview modal.
- Fixed: Issue where plugin titles were not alphabetical.
- Fixed: Disabled third party premium dependencies.
- Fixed: Issue where crash would occur when Redux could not write out a file.
- Fixed: CSS selectors with HTML entities, like >, were not getting decoded for the passed compiler values.
- Fixed: Redux Pro activation issue.
- Fixed: Invalid logic causing some extensions not to run.
- Release date: Sep 18, 2020
** For a full changelog, see https://github.com/reduxframework/redux-framework-4/blob/master/CHANGELOG.md **
Installation
- Upload the entire plugin folder to the
/wp-content/plugins/
directory. - Activate the plugin through the ‘Plugins’ menu in WordPress.
Once Installed and Activated you will be invited to Activate your Redux account. This is entirely voluntary and can easily be dismissed.
If you want, you can use the Gutenberg plugin to get bleeding-edge experiments by the Gutenberg team.
FAQ
Who should use the Redux Block Library for Gutenberg?
The Redux Block Library for Gutenberg is a complete package of unique and creative templates that will help you build beautiful pages and posts on a website. It is of value for everyone and for all who love Gutenberg.
What are the requirements to use the Redux Library for Gutenberg?
You only need to have the latest version of WordPress on your website, to begin with. Redux is for Gutenberg is basically an addon for the default WordPress block editor. Therefore, the latest WordPress installation along with a theme should be enough, to begin with.
What themes does Redux Library for Gutenberg work with?
Redux is built to work wonderfully with all themes.
Can I use Redux for Gutenberg even while having another Page Builder?
The basic need or requirement for Redux for Gutenberg is the latest WordPress version. Should you need help, you can get in touch with us.
Can I use Redux for Gutenberg on client websites?
Yes! You can certainly use Redux on yours as well as your client’s websites.
Will Redux slow down my website?
Wordpress Redux Folder
Absolutely not! The Redux Library for Gutenberg plugin is built with ease and performance in mind. Its module architecture and the clean code keep it extremely fast. Every performance issue that seems to be coming from Redux is actually the integration code of third-party developers. If you’re having issues let us know and we’ll try to help you out.