-
Notifications
You must be signed in to change notification settings - Fork 6
Is there a minimal example for gw2-ui? #5
Comments
For now, you can refer to the You'll want to create your redux store similar to this: gw2-ui/packages/gw2-ui-docs/.storybook/createStore.js Lines 1 to 23 in 8820e94
and wrap your app like this: import { Provider } from 'react-redux';
import { ThemeProvider, baseTheme } from 'gw2-ui';
import createStore from './createStore';
const store = createStore();
// ...
<Provider store={store}>
<ThemeProvider theme={baseTheme}>
<App/>
</ThemeProvider>
</Provider>
// ... Then you can use the components as in the gw2-ui Storybook - check the right panel's tabs for available props. |
Thanks for the reply and it worked very well for me. Very thanks! I'm not familiar with react-redux... Now here I get another question, MistlockInstability is fine for me but when I try to use skill template then get import './App.css';
import { Skill } from "gw2-ui";
import { MistlockInstability } from 'gw2-ui';
function App() {
return (
<div className="App">
<Skill id={14375} />
<MistlockInstability name="Adrenaline Rush" />
</div>
);
}
export default App; I think it's a prop type issue so I tried to use int(number) prop but didn't work. I tried to look up the source code of Here's my code, one with next.js and the other use pure react code. Both got the same exception. |
I tried to use gw2-ui in my react next.js repo, but i can't fix it because of redux issues. Here's my code, help
next-redux-thunk-example.zip
The text was updated successfully, but these errors were encountered: