Questions tagged [redux-framework]

A simple options framework for WordPress themes and plugins.

Redux Framework is a simple options framework for themes and plugins.

Redux Framework is open source, and the source code can be found on GitHub.

163 questions
83
votes
6 answers

How to sync Redux state and url query params

I have a web page with a search panel. Search panel has several input fields: id, size, ... What I want is when user set search values (for example: id=123 and size=45) and press a search button: searchState in Redux reducer should be updated with…
75
votes
4 answers

Subscribe to single property change in store in Redux

In Redux I can easily subscribe to store changes with store.subscribe(() => my handler goes here) But what if my store is full of different objects and in a particular place in my app I want to subscribe to changes made only in a specific object in…
karol.barkowski
  • 1,347
  • 2
  • 12
  • 15
75
votes
9 answers

React router redirect after action redux

I'm using react-redux and react-router. I need to redirect after an action is dispatched. For example: I have registration a few steps. And after action: function registerStep1Success(object) { return { type: REGISTER_STEP1_SUCCESS, …
ximet
  • 1,048
  • 2
  • 9
  • 15
46
votes
2 answers

Redux: Opinions/examples of how to do backend persistence?

I am wondering how folks using Redux are approaching their backend persistence. Particularly, are you storing the "actions" in a database or are you only storing the last known state of the application? If you are storing the actions, are you…
Lee
  • 473
  • 1
  • 4
  • 4
31
votes
4 answers

Where should I handle sorting in Redux App?

I have an action / reducer / components. In one of my components (component dump) I have a Select. I get information on what type of filter my store. Where can I handle it in action, or reducer?
ZPPP
  • 1,499
  • 2
  • 14
  • 25
16
votes
7 answers

Use React-intl translated messages in Redux middleware

I support several languages in my application and use React-intl for this. I have the Redux middleware where I make a call to the server and in the case of error I want to show an error on the UI. I know that I can do something like: 1) dispatch an…
Anton
  • 1,031
  • 1
  • 8
  • 6
16
votes
3 answers

Redux connect() with multiples actions / states

What is the proper way of connecting multiple states with corresponding action creators in Redux? And is that even a good idea? How can I work around that if it's a stupid idea? export default connect( // which part of the Redux global state…
Livioso
  • 1,035
  • 1
  • 10
  • 16
11
votes
2 answers

wordpress how to add wp_editor in an array

I had a small problem in my wordpress code I need to show a wordpress wp_editor in my page where it has array of values.the values are defined like the following $fields[] = array( 'name' => __('Class', 'my-theme'), 'desc' =>…
Syed mohamed aladeen
  • 5,943
  • 3
  • 25
  • 53
5
votes
1 answer

Using OAuth2 refresh token in React Redux app

I have an app that has OAuth2 implemented. It works fine, but I'm confused with refresh_tokens here. My app is using React + Redux combination. I know I need to check if my access_token expired and then ask for new one using refresh_token. Okay...…
Nickon
  • 8,180
  • 10
  • 52
  • 105
4
votes
3 answers

Redux - why loading everything in state at root

I am trying to understand Redux and having some difficulty. I understand the concept of combineReducer, ie .... var reducer = combineReducers({ user: userReducer, products: productsReducer }) But what if I have thousands of products, only…
user1177440
3
votes
1 answer

How can I model interdependent data with cascading updates in Redux?

For example, say I have two separate lists of items on a page. Perhaps we're ordering from a pizza and sub shop. List 1 - Food Type - Pizza, Sub List 2 - Condiment - Lettuce (Sub only), Onions (Both), Anchovies (Pizza only) I have two separate…
Adam Arthur
  • 369
  • 2
  • 10
3
votes
1 answer

What is the correct way to implement transactions with redux

I need to run two queries to a server and if successful perform some action. Without redux I'd do it like that using Q library: $q.all([service.doAction1(),service.doAction2()]).then(function(){ //perform some actions }) My question is how the…
Max Koretskyi
  • 85,840
  • 48
  • 270
  • 414
3
votes
2 answers

Update wordpress blogname and blogdescription using Redux

Is it possible to update wordpress blogname and blogdescription via Redux framework. array( 'id' => 'blogdescription', 'type' => 'text', 'title' => 'Blog Description', 'default' => '', ),
cbm
  • 77
  • 5
3
votes
2 answers

Create a new custom field option in redux wordpress framework

I want to create new field in redux wordpress framework using Custom fields, but I can't find any help or example using this. i want to create a field with a switch and text field both. Any suggestions is most appreciated.
Lucifer
  • 520
  • 1
  • 6
  • 25
3
votes
1 answer

Dynamic Stylesheet with Redux framework

I have fall a problem to make stylesheet dynamic by redux. In my config.php I have write this code. array( 'id' => 'scheme', 'type' => 'select', 'title' => __('Theme Stylesheet', 'redux-framework-demo'), 'subtitle' …
BizedKhan
  • 624
  • 5
  • 12
1
2 3
10 11