Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ab test rammeverk #440

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Ab test rammeverk #440

wants to merge 10 commits into from

Conversation

thomaslund
Copy link
Contributor

No description provided.

const { Provider } = ExperimentsContext;
const useVariant = experiments.find(
experiment =>
experiment.id.localeCompare(experimentId, undefined, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvorfor bruke localeCompare? Og hvorfor ikke bruke isValidExperiment funksjonen fra under?

experiments: ExperimentShape[];
}

export const fetchVariantIndex = ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kan ikke se at denne blir brukt noe sted? Viss den blir det bør den i en util funksjon

experimentId,
onVariantMount,
}}>
{children}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bedre API og sende inn en array med varianter i stedet for renderprops? Trenger man ikke eksponere til ndla-frontend, og man trenger ikke context for man kan bare sende props direkte inn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Takk for gode tilbakemeldinger. Vi ser på saken 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants