We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
The text was updated successfully, but these errors were encountered:
Try looking into:
const {state} = props; Then assign values into state,
Or in ActionProvider, use the setState fn.
ActionProvider
setState
Sorry, something went wrong.
No branches or pull requests
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
The text was updated successfully, but these errors were encountered: