⭐️ If you like reactpatterns, give it a star on GitHub! ⭐️
Menu
React PatternsReact Patternsreactpatterns
HomeBlogGitHub
React PatternsReact Patternsreactpatterns
  • Home
  • Blog
  • GitHub
  • React Patterns
    • Introduction
    • Proxy component
    • Make the API call
    • Stateless function
    • Higher-Order function
    • Higher-Order component
    • Accessing a child component
    • JSX spread attributes
    • Render callback
    • Function as child component
    • Function as prop component
    • Component injection
    • Conditional rendering
      • If else
      • Ternary operation
      • Logical && operator
      • Switch case operator
      • Conditional rendering with enum
      • Multi-level conditional rendering
      • With higher order component
      • External templating component
    • Destructuring
      • What is destructuring?
      • Destructuring function argument
      • Nested destructuring
      • Destructuring rest/spread operator
    • Promises over callbacks
    • Container component (Stateful component)
    • State hoisting
    • Pure component avoid heavy re-render
  • React Anti-patterns
    • Props in initial state is an anti-pattern
    • shouldComponentUpdate avoid heavy re-renders
    • Indexes as a key is an anti-pattern
    • Spreading props on DOM elements is an anti-pattern

Proxy Component

A proxy component is a placeholder component that can be rendered to or from another component. In short a proxy component is a reusable component.

For example:

import React from 'react'
class Button extends React.Component {
render() {
return <button type="button">My Button</button>
}
}
class App extends React.Component {
render() {
return <Button />
}
}
export default App
Previous
« React Patterns
Next
Make the API Call in componentDidMount() »

Docs

  • Home

Community

  • Twitter
  • Facebook
  • LinkedIn

More

  • Blog
  • GitHub
Copyright © 2021 React Patterns Org.