Skip to content

Instantly share code, notes, and snippets.

@ahmadseder
Created February 15, 2023 19:04
Show Gist options
  • Save ahmadseder/5071930acd143afd95eb5cb705646316 to your computer and use it in GitHub Desktop.
Save ahmadseder/5071930acd143afd95eb5cb705646316 to your computer and use it in GitHub Desktop.
Canaan CQRS
# You need to clone the project and run it
# For the CQRS and domains create everything under a file called CQRS.js
# For handling the flow create a file called services.js
@ahmadseder
Copy link
Author

To use the subscribe with React use

const [some,setSome] = useState(); 
useEffect(()=>{
domain.subscribe(query,setSome);
},[]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment