@ndmspc/react-ndmbase-core
v0.20220211.0
Published
react-ndmbase - Made with create-react-library
Downloads
2
Readme
@ndmspc/react-ndmspc-core
Made with create-react-library
Install
npm install --save @ndmspc/react-ndmspc-core
Usage
import React from 'react'
import {
localStore,
redirectStore,
NdmSpcWebSocket,
useJsRootVersion
} from '@ndmspc/react-ndmbase-core'
import LocalStoreInfoExample from './components/LocalStoreInfoExample'
import RedirectExample from './components/RedirectExample'
import HttpExample from './components/HttpExample'
let store = {
local: localStore(),
localSecond: localStore(),
redirect: redirectStore(),
ws: redirectStore(),
http: redirectStore()
}
const App = () => {
const version = useJsRootVersion()
return (
<>
{version && <h2>JSROOT Version: {version}</h2>}
<NdmSpcWebSocket store={store.ws} />
<LocalStoreInfoExample store={store.local} name='localOne' timeout='1000' />
<LocalStoreInfoExample
store={store.localSecond}
name='localTwo'
timeout='1500'
/>
<RedirectExample store={store.redirect} />
<HttpExample store={store} />
</>
)
}
export default App
License
MIT © ndmspc