python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to catch when screen orientation change in react native with mobx?
Can you explain me the right way to handle orientation changing in react native app with mobX.
For now I have tried make something like this:
@observer
export class ChartSTMWork extends Component {
...
Vladimir
Votes: 0
Answers: 1
Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: OrderLine@1.price
class OrderLine {
price = 0
amount = 1
stop = () => { }
constructor(price: number) {
makeObservable(this, {
price: observable,
amount: observable,
...

Durfingo005
Votes: 0
Answers: 1
Mobx observable state properties with typescript
The question is about how to do things right.
As i understand the official Mobx documentation (but i think i missed something), observed store properties should be updated only through actions.
If so,...
Rus
Votes: 0
Answers: 1
Observer not working with useLocalObservable
import { Observer, useLocalObservable } from 'mobx-react-lite';
function App() {
const { count, decrement, increment } = useLocalObservable(() => ({
count: 0,
increment() { this.count++ ...

Edgar
Votes: 0
Answers: 1