react-composable-api
v1.3.1
Published
react composable api
Downloads
68
Maintainers
Readme
react composable api
Lightweight library for creation composable functional components. This lib provide a classic hooks and life cycle actions of composable pattern:
import {ref, watch, onMounted} from 'react-composable-api'
function App() {
const state = ref('init')
onMounted(() => {
state.value = 'mounted'
})
watch(state.value, () => {
console.log(`is changed value: ${state.value}`)
})
return <h1 onClick={() => state.value = 'changed'}>Actual value: {state.value}</h1>
}
export default App
work in progress for bested result!