You can do it this way
library(tidyverse)
reorder_within <- function(x, by, within, fun = mean, sep = "___", ...) {
new_x <- paste(x, within, sep = sep)
stats::reorder(new_x, by, FUN = fun)
}
scale_x_reordered <- function(..., sep = "___") {
reg <- paste0(sep, ".+$")
ggplot2::scale_x_discrete(labels = function(x) gsub(reg, "", x), ...)
}
tibble(group = c(1,1,1,1,2,2,2,2),
label = c('a','b','c','d','e','f','a','b'),
value = c(10,9,8,7,20,2,12,1)) %>%
ggplot(aes(x = reorder_within(label, value, group), y = value, fill = as.factor(group))) +
geom_bar(stat = 'identity') +
coord_flip() +
scale_x_reordered() +
facet_wrap(~ as.factor(group), scales = "free_y")

The author of the helper functions is David Robinson, here is the link to the github repo