Giter Site home page Giter Site logo

Comments (7)

tenhobi avatar tenhobi commented on May 26, 2024

I do not know Redux, but I suppose it's something with data flow in and out? In Flutter that can be done using callbacks, but a truth is, that this can be messy with bigger apps.

So we may use something like this.

Btw. issue #12 is about working in "BLoC", which is (I suppose) MVP-alike pattern between view (flutter, angular) and model (some common logic). This a disjointed problem, right? Redux controlls data/event flow and this BLoC controlls comunication between view and model, eg. database etc.

from flashcards.

danbalarin avatar danbalarin commented on May 26, 2024

I don't know Redux/state containers much neither, but for example iPhone calculator bug was caused exactly by this. And according to that Medium article, "fire-and-forget" animations are faster (less CPU/GPU demanding), than those with callbacks. And yeah, callbacks get pretty messy in bigger projects.

Will take a look on #12.

Maybe @michaldrabina could know something about state containers, huh?

from flashcards.

tenhobi avatar tenhobi commented on May 26, 2024

#12 is about providing data and functionality (e.g. model in MV***), so far as I understand, it should be different.

Okay then, we can use something like Redux, but we have to explore that and determine a way how to use it in the project (and next to #12). 😸 👍

from flashcards.

tenhobi avatar tenhobi commented on May 26, 2024

There is an artice about this Redux thing. https://medium.com/shift-studio/flutter-redux-and-firebase-cloud-firestore-in-sync-2c1accabdac4

from flashcards.

tenhobi avatar tenhobi commented on May 26, 2024

All material widgets use callbacks to comunicate with its parents etc. so we might do it as well, at least in the beginning. Usin' something like redux would mean that we would have to learn something new, something quite complex.

So we will do things like Flutter's material widgets do and can switch to something like Redux it we would have some complications etc.

Souds ok, @Kenny11CZ ? (you can close it if you agree)

from flashcards.

tenhobi avatar tenhobi commented on May 26, 2024

Example:

class Counter extends StatefulWidget {
  @override
  _CounterState createState() => new _CounterState();
}

class _CounterState extends State<Counter> {
  int _counter = 0;

  void _increment() { // this
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return new Row(
      children: <Widget>[
        new RaisedButton(
          onPressed: _increment, // this
          child: new Text('Increment'),
        ),
        new Text('Count: $_counter'),
      ],
    );
  }
}

from flashcards.

danbalarin avatar danbalarin commented on May 26, 2024

Sure, we can add it later if needed, so...

from flashcards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.