Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
React native styled components cannot override component's style

I have a weird problem with stlyed components. I have a component Header with a basic style but when a try to use this component and extend the style nothing happens. Can someone tell me what going on?

import styled from 'styled-components/native';
export const Container = styled.SafeAreaView``;

export const Content = styled.View`
  height: 72px;
  padding: 0 24px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
`;

Header component

import React, { PropsWithChildren, FC } from 'react';
import { Container, Content } from './styles';

const Header: FC = ({ children }: PropsWithChildren<unknown>, props) => {
  return (
    <Container {...props}>
      <Content>{children}</Content>
    </Container>
  );
};

export default Header;

import styled from 'styled-components/native';

import Header from '../components/Header/index';

export const Container = styled(Header)`
  background: blue;
  height: 200px;
`;

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!