Question. Let $\mathbb A=\mathbb R\!\smallsetminus\!\mathbb Q$ be the irrational numbers. Is there a continuous function $\,f:\mathbb A\to\mathbb Q$, which is nowhere locally constant? – i.e., for every $a<b$, the restriction $f\,\big|_{\,(a,b)\cap\mathbb A}$ is not constant.
Clearly, there exist many non-constant such functions, which are continuous, but fail to be nowhere locally constant.
One failed attempt: Let $\mathbb Q=\{q_n\}_{n\in\mathbb N}$, and set
$$
f(x)=\sum_{n\in\mathbb N} a_n\mathrm{sgn}(x-q_n),\tag{1}
$$
where $\{a_n\}_{n\in\mathbb N}\subset\mathbb Q^+$, with $\sum_{n\in\mathbb N}a_n<\infty$.
Clearly $f$ is continuous in $\mathbb A$, and it does not take necessarily only rational values.
EDIT. If there exists a sequence $\{a_n\}_{n\in\mathbb N}\subset\mathbb Q^+$, such that $\sum_{n\in S}a_n\in\mathbb Q$, for every $S\subset\mathbb N$, then the function $f$, defined by $(1)$ possesses the sought for properties.
There is no such function and one way to show this makes use of the Baire category theorem.
Assume that $f:{\mathbb A} \rightarrow {\mathbb Q}$ is continuous. For each $r \in {\mathbb Q},$ let $E_r = f^{-1}(r)$ be the inverse image of the set $\{x\}$ under $f.$ Note that ${\mathbb A} = \cup \{E_r: r \in {\mathbb Q}\}.$ Because $\mathbb A$ cannot be written as a countable union of nowhere-dense-in-${\mathbb A}$ sets (by the Baire category theorem; recall that $\mathbb A$ is completely metrizable), at least one of the "$E_r$ sets" is not nowhere-dense-in-${\mathbb A},$ which means that at least one of the "$E_r$ sets", say $E_{r_0},$ is somewhere dense in ${\mathbb A}.$ Also, since $f$ is continuous, each $E_r$ is a closed set in ${\mathbb A}.$ In particular, $E_{r_0}$ is closed in ${\mathbb A}.$ It follows that $E_{r_0}$ contains an ${\mathbb A}$-interval, and because $f$ takes only the value $r_0$ on this interval, it follows that $f$ is constant on this interval.