title: React-Native how to show different API by same id in Flatlist
body: <p>i have two different API and i want show two API in one Flatlist this is worked (look the picture). i show it using filter by id API (if API have same id will show). My question is how to remove/hide/dont show null value flatlist (look the picture)?
  Im using API from <a href="https://jsonplaceholder.typicode.com" rel="nofollow noreferrer">https://jsonplaceholder.typicode.com</a></p>
  <p><a href="https://i.stack.imgur.com/Hvkyq.png" rel="nofollow noreferrer">picture my app</a></p>
  <pre><code>  const {user, post} = useSelector(state =&gt; state.reducer);
    const dispatch = useDispatch();
  
    const getData = [...user, ...post];
  
    useEffect(() =&gt; {
      dispatch(getProfile());
      dispatch(getPost());
    }, []);
  
  
    const tailwind = useTailwind();
  
  const renderPost = ({item}) =&gt; {
      const renUsr = user.filter(renUsr =&gt; renUsr.id === item.userId);
      return (
        renUsr.id !== item.userId ? (
          &lt;View style={tailwind('pb-4')}&gt;
            &lt;View style={tailwind('px-4 py-4 bg-gray-200 mx-6 rounded-[20px]')}&gt;
              &lt;View style={tailwind('flex flex-row')}&gt;
                &lt;Image style={tailwind('rounded bg-black w-8 h-8')} /&gt;
                {renUsr.map(posting =&gt; (
                  &lt;Text
                    key={posting.id}
                    style={tailwind('pl-2 font-semibold py-2')}&gt;
                    {posting.name}
                  &lt;/Text&gt;
                ))}
              &lt;/View&gt;
              &lt;View style={tailwind('mt-2')}&gt;
                &lt;TouchableHighlight
                  style={styles.touchHighlight}
                  onPress={navigation}&gt;
                  &lt;View style={tailwind('bg-gray-200 p-1')}&gt;
                    &lt;Text key={item.id}&gt;{item.body}&lt;/Text&gt;
                  &lt;/View&gt;
                &lt;/TouchableHighlight&gt;
              &lt;/View&gt;
            &lt;/View&gt;
          &lt;/View&gt;
        ) : (
          null
        ) 
      );
    };
  
    return (
        &lt;FlatList
          data={getData}
          renderItem={renderPost}
          keyExtractor={item =&gt; item.id}
        /&gt;
    );
  };
  </code></pre>