Devjar

live code runtime for your react project in browser


index.js
./mod1.js
+
import { useState } from 'react'
import useSWR from 'swr'
import Text from './mod1'

export default function App() {
  const [num, inc] = useState(1)
  const { data } = useSWR('swr', key => key)
  return (
    <div>
      <p>Hello <Text /> with {data}</p>
      <p>No. {num}</p>
      <button onClick={() => inc(num + 1)}>increase</button>
    </div>
  )
}