Skip to content

ytoune/yt-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yt-react

npm version

reimplementing react as an exercise

usage

import { createRoot, useState } from '@ytoune/yt-react'
const App = () => {
  const [count, setCount] = useState(0)
  return (
    <div>
      <p>count: {count}</p>
      <button onClick={() => setCount(c => c + 1)}>+</button>
    </div>
  )
}
createRoot(document.body).render(<App />)

todo

  • jsx, jsxs

  • h (createElement)

  • render with simple html

  • rerender

  • useRef

  • useState

  • useEffect

  • useMemo

  • useReducer

  • createContext, useContext

  • array children, key prop

  • ref prop

  • useCallBack

  • style

  • dangerouslyuSetInnerHTML

About

reimplementing react as an exercise

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages