Skip to content

Instantly share code, notes, and snippets.

View rMazeiks's full-sized avatar
🦀

Reinis Mazeiks rMazeiks

🦀
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@rMazeiks
rMazeiks / main.rs
Created August 10, 2022 09:31
Dioxus example: Dragging to move a red square
// Using `master` version of dioxus
// dioxus = { git="https://github.com/DioxusLabs/dioxus.git" }
#![allow(non_snake_case)]
use dioxus::events::MouseEvent;
use dioxus::prelude::*;
fn main() {
dioxus_desktop::launch(App);
@rMazeiks
rMazeiks / upgrading_scandipwa_v3-beta.7.md
Last active October 6, 2020 13:43
Notes about upgrading ScandiPWA-based projects from beta.3 to beta.7

Documented changes

Refer to the release notes to get more details on these changes

Namespaces

Need to replace old middleware() syntax with @namespace; see documentation

Migration process can be automatised: disable use-namespace rule, enable no-middleware and then npm run eslint:fix. Check for correctness, enable the first rule back and enjoy the new awesome syntax!

Be careful, the automated process is not always correct:

  • If mapStateToProps was wrapped in middleware in the declaration, it will be replaced by undefined, and the namespace decorator will be added in an unpredictable location in the file. This is because the conventional way of wrapping mapStateToProps is when using it to connect, not in the declaration.