Q:

Odd behavior in passed params with React Navigation

Here's the screen:
import React from 'react';
import { View, StyleSheet, Image, TouchableOpacity, Text } from 'react-native';
import { NavigationActions } from 'react-navigation'

export default class ContentScreen extends React.Component {    
  render() {
    const { state } = this.props.navigation;
    const { code } = state.params.code
    return(
      <Text>CONTENT GOES HERE: {JSON.stringify(state)} / '{code}'</Text>
    )
  }
}

And the navigation invocation:
<TouchableOpacity key={k} onPress={() => {navigate("Content", {code: k})}} style={styles.listing}>

And here's what's displayed:
CONTENT GOES HERE: {"params":{"code":"222"},"key":"id-151010...","routeName":"Content"} / ''

Which is really @(#$ weird. The value clearly exists at state.params.code, as can be seen by the JSON string, and yet when accessed, it isn't present. Object.values(state.params) and Object.keys(state.params) give the expected results (["code"] and ["222"]).
So, like, any ideas as to what's going on? Or ideas about how to further investigate?

A:

Looks like you are destructuring one level too deep.
const { code } = state.params.code;

This is basically looking for this.props.state.params.code.code
Try:
Const { code } = state.params;

Or:
const { navigation: { state: { params: { code } } } } = this.props;

