score:1
I don't believe there is currently any documentation specifically on jssPreset
, though the JSS plugins documentation shows an example of using it.
When something isn't explicitly documented, the next place to look is the source code. Looking at the jssPreset source code, you'll find that this returns a JSS configuration object that includes all the JSS plugins used by Material-UI.
If you look for usages of it, you'll find it used to create the default JSS instance.
The sandbox you linked to contains the following code:
import jssTemplate from 'jss-plugin-template';
const jss = create({
plugins: [jssTemplate(), ...jssPreset().plugins],
});
function StringTemplates() {
return (
<StylesProvider jss={jss}>
<Child />
</StylesProvider>
);
}
This is using jssPreset
to get the default set of plugins included in Material-UI, and then adding one more plugin to the list (jssTemplate
), then specifying to use that new JSS configuration via StylesProvider
.
You can find the list of available JSS plugins in the JSS documentation: https://cssinjs.org/plugins?v=v10.0.0#jss-plugins.
Source: stackoverflow.com
Related Query
- Where is the documentation for jssPreset in this CodeSandbox? I didn't find it
- Where can I find the API guide for this usage of passing props to children in React
- How can I use a button to change the Theme for material UI on my site? this is where I am so far
- is there solve for this Error: Could not find "store" in the context of "Connect(App)". Either wrap the root component in a <Provider>
- What is the difference between .ts and .tsx extensions. Both are used as extensions for typescript files in react. So where should we use them?
- Invariant Violation: The navigation prop is missing for this navigator
- Uncaught Error: Invariant Violation: findComponentRoot(..., ...$110): Unable to find element. This probably means the DOM was unexpectedly mutated
- Error when creating new object from existing one using `...`: In this environment the sources for assign MUST be an object
- Where do I find the object names of icons in the FontAwesome free packages?
- npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
- bind(): You are binding a component method to the component. React does this for you automatically?
- React warns about passed prop with value null, where the PropType for the prop is not required
- How do I implement minimum 5 characters validation in this ant design login form ? I cant find the examples
- Can't find variable: _d when running react native app for the first time
- Where should you put the git hub workflow directory for actions in a full-stack project?
- Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons
- I can't find the matching TypeScript type for `displayName` as a prop of `type`
- Where to find locale for US in @formatjs/intl-relativetimeformat/dist/locale-data/
- How to locate react-leaflet map to user's current position and get the borders for this map?
- Formik, Material UI Autocomplete and Firestore - where query to find the array parameter
- Received NaN for the `children` attribute. If this is expected, cast the value to a string
- Warning: Received NaN for the `value` attribute. If this is expected, cast the value to a string. input on multipart form
- when i increment the counter it increases by 2 not one. i am using react context for this
- Is this a correct use case for the React useImperativeHandle hook?
- How to find out where the error is coming from in ReactJS?
- Where do I find the available icons of react-bulma-components?
- Why is there a semi-colon in the object structure for expected props in this typescript react component?
- Where can I find documentation on why `this` context is undefined when assigning object method's as DOM event handlers in React?
- Where does the root reducer come from in this redux react example and how does dispatch knows which reducer to go?
- Why is this app code only working from the right side or else the ReactDOM.findDOMNode querySelector cant find className
More Query from same tag
- Property doesn't exist on type "object" error after checking if the property exists on the object
- Why can't I map array to Material UI Chip?
- How to avoid react minified warning
- Could not find a declaration file for module 'react-select/async'
- Putting React templates in properties of one global variable
- Async variable appearing empty in conditional logic, yet it is present in console logs
- ReactJs change text upon button click problem
- component dont rerender when I remove item from state but it rerender when I add item
- Component did update behaving abnormally
- Why is my delete function resulting in an undefined value error?
- loading external css file just for one react component
- Setting MDX Component Props in NextJS
- REACT- Popover doesn't display my json content
- why do I have to put babel-presets inside .babelrc and webpack.config.js?
- Redux withRouter in static method of superclass
- How to use react ref to get value from html select element?
- bootstrap progress bar doesn't render inside react component
- How to get history on react-router v4?
- how to add tags in react.js semantic ui in select
- How to trigger li of map onClick in React functional component?
- fetching data in React with DynamicRoutes, nextJS and useEffect
- How to pass child DOM nodes to react styled components
- How to capture date in next js head?
- `experiments.topLevelAwait: true` does unexpectedly not work - ReactJS still throws error
- Show hide toggle List Component AntDesign
- How compile TSX without create-react-app?
- Upload multiple files/images, fetch, formData
- How to change a <a> tag color when I click on it and it doesn't change until I change my URL
- React Code Splitting in React.createElement()
- map and deep object with Ramda