Skip to content

Locheed/react-extract-logic-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Tip | Extract logic out of component to external module

Build Status

To make logic reusable in many other components it can be extracted from component to separate module. This makes it easier to unit test as function and keeps your component nice and clean.

  • App.js is the component after extract
  • notExtractedComponent.js is the component without extract
  • changeLettering.js is the extracted logic
  • changeLettering.test.js test file for logic

About

Extracting logic out of React component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors