Open jebberwocky opened 7 months ago
Can we share the state between custom messages?
scenario:
there are 2 custom messages A and B and customMessages: { a: (props) => <A {...props} />, b: (props) => <B {...props} />,
customMessages: { a: (props) => <A {...props} />, b: (props) => <B {...props} />,
there is a state const [isLoaded, setIsLoaded] = useState(false); in A
const [isLoaded, setIsLoaded] = useState(false);
like to share const [isLoaded, setIsLoaded] = useState(false); from A to B
B can call setIsLoaded
setIsLoaded
thanks
Can we share the state between custom messages?
scenario:
there are 2 custom messages A and B and
customMessages: { a: (props) => <A {...props} />, b: (props) => <B {...props} />,
there is a state
const [isLoaded, setIsLoaded] = useState(false);
in Alike to share
const [isLoaded, setIsLoaded] = useState(false);
from A to BB can call
setIsLoaded
thanks