Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 29 2019 10:34
    grebbekevin commented #237
  • Dec 12 2018 04:28
    aaronfranke opened #242
  • Dec 12 2018 04:26
    aaronfranke commented #217
  • Dec 04 2018 10:32
    rikukissa removed as member
  • Oct 09 2018 22:12
    tino-junge synchronize #240
  • Oct 09 2018 22:12

    tino-junge on upgrade-react-native-57

    Update android build tool versi… (compare)

  • Oct 09 2018 22:10
    tino-junge synchronize #240
  • Oct 09 2018 22:10

    tino-junge on upgrade-react-native-57

    Travis use xcode 9.4 (compare)

  • Oct 09 2018 22:03
    tino-junge synchronize #240
  • Oct 09 2018 22:03

    tino-junge on upgrade-react-native-57

    Travis: Accept android sdk lice… (compare)

  • Oct 09 2018 21:56
    tino-junge synchronize #240
  • Oct 09 2018 21:56

    tino-junge on upgrade-react-native-57

    Revert project rename in packag… (compare)

  • Oct 09 2018 21:36
    tino-junge synchronize #240
  • Oct 09 2018 21:36

    tino-junge on upgrade-react-native-57

    Travis: use xcode10 and auto ag… (compare)

  • Oct 09 2018 19:10
    tino-junge edited #241
  • Oct 09 2018 19:10
    tino-junge review_requested #241
  • Oct 09 2018 19:10
    tino-junge opened #241
  • Oct 09 2018 19:09

    tino-junge on reasonaboutable

    Added proper documentation for … (compare)

  • Oct 09 2018 18:56
    tino-junge synchronize #240
  • Oct 09 2018 18:56

    tino-junge on upgrade-react-native-57

    Require Node 8 in travis builds (compare)

Fabrizio Moscon
@fabriziomoscon

ok, I have done some more digging. So possibly I get errors when I remove redux-loop, because the entire state is immutable not just the sub-reducers. That is because of how snapshot.js rehydrate is implemented and my mapStateToProps looks like this

const mapStateToProps = (state) => {
    return {
        isLoggedIn:       state.getIn(['auth', 'isLoggedIn']),
        firstName:        state.getIn(['account', 'profile', 'first_name']),
        lastName:         state.getIn(['account', 'profile', 'last_name']),
        email:            state.getIn(['account', 'profile', 'email']),
        loading:          state.getIn(['account', 'loading']),
    }
}

After researching I found these relevant discussions which explains the problem that I am facing:
reactjs/redux#153
reactjs/redux#548

To replace this block and avoid using redux-loop: https://github.com/futurice/pepperoni-app-kit/blob/master/src/redux/reducer.js#L19-L30
I am not sure how we can do without rewriting an ad hoc combineReducers() or using a library like redux-immutable or similar.

@chadrien maybe it would be easier to comment on actual code. if I write it down you could tell me what I am doing wrong.

Hadrien de Cuzey
@chadrien
@fabriziomoscon 100% POC that I wrote in 10 minutes: chadrien/pepperoni-app-kit@465592c
Obviously, tests fails and I ignore the RESET_STATE part, but it's just to demo that we can easily get rid of redux-loop without adding any new lib
Hadrien de Cuzey
@chadrien
(RESET_STATE would just be if (action.type === RESET_STATE) return new RootState(); probably)
(and btw my POC is working just fine if you run react-native run-ios)
Fabrizio Moscon
@fabriziomoscon
I see what you mean. I was not thinking of adding framework code to map the state, but that is definitely an option. I was trying to find a module that is used in this case by the community to make things standard in a way, but that is not as evident as I thought.
The other option would be to have immutable state on the sub-reducers only, so even the code to map the state would not be necessary, but that I don't know if having an immutable root state is better
Hadrien de Cuzey
@chadrien
Me neither ¯\_(ツ)_/¯
My point being: it's not because there's a npm package of it that you have to use it
Fabrizio Moscon
@fabriziomoscon
sure got it
Hadrien de Cuzey
@chadrien
Sometimes you can just write clean, simple, readable 10 lines of code for the same result :)
Fabrizio Moscon
@fabriziomoscon
I agree. I think your POC code could be a good starting point for simplifying pepperoni and remove redux-loop.
Hadrien de Cuzey
@chadrien
Feel free to steal some ideas ;)
Fabrizio Moscon
@fabriziomoscon
yes I will. Thanks ;)
Fabrizio Moscon
@fabriziomoscon
navigationState doesn't have a key index since I changed the navigation state back in the days
Fabrizio Moscon
@fabriziomoscon
@tino-junge pepperoni could not compile in Android because the references to Auth0 are still inside the Manifest and styles.xml. I am submitting a PR with the fix
Fabrizio Moscon
@fabriziomoscon
#157 and #158
Tino Junge
@tino-junge
Cheers @fabriziomoscon .
Tino Junge
@tino-junge
Tests failing on your branches @fabriziomoscon . It looks like a similar problem to Lauris branch #156 that we’d need to also set jest-react-native to a fixed version e.g. "jest-react-native": "~17.0.2”,
Fabrizio Moscon
@fabriziomoscon
ok I have created #159 let's see if that makes it pass on Travis
ok tests passes, if we merge it all other PRs can rebase on top of it
Tino Junge
@tino-junge
Great. Just merged it :)
Fabrizio Moscon
@fabriziomoscon
cool. I have rebased
Tino Junge
@tino-junge
Thanks. Will review it latest tomorrow morning
Marcelo Gheiler
@Sorgrum
Hi, I'm using Pepperoni App and I'm trying to create an async action. I noticed that when I click the Random button for the counter, only the 'RANDOM_REQUEST' action is dispatched, but I never actually see the 'RANDOM_RECIEVE' action dispatched, even after the one second. Is this because of Redux Loop, or is it a bug?
Marcelo Gheiler
@Sorgrum
Nevermind, checked the docs for Redux promise and I see that it is just how that functions
Fabrizio Moscon
@fabriziomoscon
well done @tino-junge for the update!
Fabrizio Moscon
@fabriziomoscon
that permission is pretty bad for production apps, as users read it as a mean to hack in top of other apps.
I found this comment the most effective and clean to remove that permission from release builds:
https://github.com/facebook/react-native/issues/5886#issuecomment-251843656
Tino Junge
@tino-junge
Thanks @fabriziomoscon :smile: also good catch about this android issue. Haven't come across it so far myself but I can imagine that it's quite bad if your app doesn't require those permissions at all. Since the issue was opened already a year ago I'm wondering if they fix it anytime soon or if it's something we might want to address as part of pepperoni as well ?
Fabrizio Moscon
@fabriziomoscon
well, regardless of what facebook does the solution is quite elegant. Having a separate manifest for release prepared so users can add more exclusions or inclusion specific to release
Rasmus Eskola
@FruitieX
Regarding the discussion on immutable state in redux, personally I would also much like to see it used only in sub-reducers in Pepperoni
From my experience, being used directly on the root reducer makes it very hard to add any redux-* libraries without a lot of fiddling around. Maybe I'm missing something.
Could we benefit from something like this instead if we want immutable state in dev builds only? https://github.com/buunguyen/redux-freeze
Akos Krivachy
@krivachy
@/all Travis will be much more slower in the future, but the advantage we get is that it will build on Android and iOS + run a basic "does the app start and load the counter screen" test. Right now tests take sometimes 15 mins, so let's see how painful it is in the future.
Fabrizio Moscon
@fabriziomoscon
Open question. Why not using the built-in Promise implementation rather than bluebird?
Justin Woo
@justinwoo
honestly, i think it was only because of familiarity
i like dropping bluebird personally
Divyanshu Negi
@divyanshunegi

Hi Guys just started with redux and pepparoni , still could not figure out what does this do ?

export default connect( state => ({ isReady: state.getIn(['session', 'isReady']), isLogin: state.getIn(['session', 'isLogin']) }) )(AppView);

isReady is working but isLogin is undefined, why ? and what is this session string ? I read redux tutorial but this is what I could not understand properly , any help is highly appreciated

Divyanshu Negi
@divyanshunegi
Hello
Akos Krivachy
@krivachy
Hi @divyanshunegi that seems to be legacy code left over when we still had Auth0. You can remove the isLogin stuff, in the session state we're not setting it anywhere: https://github.com/futurice/pepperoni-app-kit/blob/master/src/modules/session/SessionState.js
And the way it works is that the reducers are combined in a namespaced way here: https://github.com/futurice/pepperoni-app-kit/blob/master/src/redux/reducer.js
Carel155
@Carel155
Hi, just downloaded pepparoni and i stumbled across this warning when i run this application with android: https://gyazo.com/6efde0c2cdea8a38fd0277709395effd . App just stays at loading screen.
Jesse Heikkilä
@exhibiton
what is your react-navigation version @Carel155 ?
If I remember correctly that seems like an error that would happen with existing pepperoni-app-kit code with react-navigation beta9 instead of the beta6 it is compatible with now.
Carel155
@Carel155
1.0.0-beta.7
chrischen
@chrischen
Is there an issue running the master branch? I just cloned it and getting lots of deprecated code warnings, and the default app just gives a spinner icon
seems like the isReady prop is never true
Malwarescan
@joelbertlive
hi all,
Is there a backend im not attaching? lol.
I was trying to change the header name but quickly realized there's a lot more to it, heh
Nico
@KarlsDaddy
Hey,
how can i add a new tab like the counter or color tab in the sample application?