Also, this is why I got confused about the extra properties:
export type Config<
TContext extends Context = Context,
TFeatureState extends FeatureState = FeatureState
> = {
initialState: TFeatureState;
storage: {
key: string;
version?: string;
};
isEnabled?: (args: {
context: TContext;
state: TFeatureState;
isEnabled?: InternalState["isEnabled"];
}) => boolean;
renderDevTools?: () => ReactNode;
};
const feature = makeFeature<Context, MAWState>({
initialState: {
testExtendedStateProp: false,
},
storage: {
key: `multi-account-warning`,
version: `1.0.0`,
},
isEnabled: ({ context, state, isEnabled }) => {
return (
isEnabled !== false
);
},
renderDevTools: () => <RenderFeature />,
customMethod: () => {},
});
Lmk what you think 🙂