worried-planet-2191
04/04/2023, 3:56 PMbetter-magician-65629
04/04/2023, 5:47 PMstate.data = action.payload looks like where there's an issue. i'm not sure if it's the only issue, but that's one that immediately glares out. you can see the redux docs for more info: https://redux.js.org/tutorials/fundamentals/part-3-state-actions-reducers#reducers-and-immutable-updates
they suggest something like this instead:
function reducer(state, action) {
switch (action.type) {
case 'update_user':
return {
...state,
data: action.payload
}
default:
return state
}
}better-magician-65629
04/04/2023, 5:52 PMbetter-magician-65629
04/04/2023, 5:59 PM{ country: 'mexico' } as part of the attributes when calling setAttributes, e.g. growthbook.setAttributes({ id: 'abc-123', country: 'mexico' }) so that these values can be read by the SDK and considered when evaluating features for users. calling setAttributes in the SDK will not update the dashboard. it's used to say "this is my current user and these are the attributes they have" and their attributes will be considered when evaluating a feature. in the below screenshots i have a country user attribute i've specified in the /attributes section of the dashboard, then it shows up under the targeting conditions dropdown for me to build my targeting conditions.white-state-74924
04/05/2023, 7:46 AMwhite-state-74924
04/05/2023, 9:30 AMswift-helmet-3648
04/05/2023, 1:17 PMwhite-state-74924
04/05/2023, 2:02 PMbetter-magician-65629
04/05/2023, 5:24 PM