Last active
          March 21, 2022 10:12 
        
      - 
      
 - 
        
Save lorenzojkrl/29715c917b925113bf5ee6b51833786f to your computer and use it in GitHub Desktop.  
    Create a React component to use RxJS interval
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import React, { useState, useEffect } from 'react'; | |
| import './style.css'; | |
| import { interval } from 'rxjs'; | |
| export default function App() { | |
| const [state, setState] = useState(); | |
| return ( | |
| <div> | |
| <h1>Hello RxJS!</h1> | |
| <p>Observable value: {state}</p> | |
| </div> | |
| ); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment