Closed sinan-aumarah closed 6 years ago
Most obvious issue is the naming, it's a generic menu screen not a contacts screen.
@adamhope I agree. The idea behind this spike is to see if people agree on the approach and maybe then refactore it to be part of the framework, but I'm not even sure if we want to move it to the framework code as most of it is pure ReactJs code.
@sinan-aumarah You could still create a MenuScreen component. You would just need to pass in a list of Label/Action or Route pairs.
@raytung @adamhope @AMitchemTW @aaron-m-edwards This is a quick spike to mimic the previous menu selection page. I refactored the contact list screen to make it stateful and store the index of a specific item in the list based on the top and bottom buttons. When you press on the screen it will then pass the index to the new contactView page which will display the contact's details
Please note: It's not the cleanest solution and it's currently all spiked up using the client code rather than the framework. Not sure if we want to make it an HOC and use Redux as it might confuse students even more. They already have a hard time trying to understand how the button remapping works, so not sure if we want to move everything to Redux. Feel free to modify it and make it cleaner.