MoonChuteConfig
The MoonChuteConfig
component governs the settings for all hooks through React Context, ensuring consistent configuration across the application.
import { MoonChuteConfig } from 'moonchute';
Usage
import { MoonChuteConfig, createMoonChuteConfig } from "moonchute";
const config = createMoonChuteConfig({
apiKey: <YOUR_MOONCHUTE_API_KEY>,
});
function App() {
return (
<MoonChuteConfig config={config}>
<YourRoute />
</MoonChuteConfig>
);
};
Configuration Parameters
config (required)
An instance of moonchute configuration that contains various configuration parameters. It defaults to createMoonChuteConfig().