Giter VIP home page Giter VIP logo

Comments (4)

tdesc avatar tdesc commented on June 12, 2024

Please give us initState for living!

from flutter_built_redux.

maxlapides avatar maxlapides commented on June 12, 2024

The more I think about it, the more I think initState would be an excellent feature for this library, but I'm not sure what the right way to implement it is. @davidmarne if you can point me in the right direction, I would be happy to work on a PR if you agree?

from flutter_built_redux.

Will-W avatar Will-W commented on June 12, 2024

My solution to this has been to create a child stateful widget in between my StoreConnection and the widget that I would normally pass straight to builder:.

I can then override initState on that widget which gives me a place to dispatch my action. It's a bit tediously boilerplate, but it works.

from flutter_built_redux.

jamesncl avatar jamesncl commented on June 12, 2024

@smiLLe has a great PR (38) which solves these issues by including these really useful callbacks onInit, onFirstBuild, onDidChange, onDispose which are present in the original flutter_redux package. For me these are pretty much essential, and not sure why they're not merged into main yet.

from flutter_built_redux.

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.