You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
describe('Test', () => {
it('Should render', () => {
// Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
render();
});
});
Environment
Libs:
- react version: 18.2.0
- reablocks version: 7.3.4
Browser:
- [x] Chrome (desktop) version latest
For Tooling issues:
- Node version: 20.11.1
- Platform: Windows 10
The text was updated successfully, but these errors were encountered:
The problem for "InlineInput" is coming from "react-18-input-autosize" library.
For example when I'm changing AutosizeInput to 'input' in this part of code - "node_modules/reablocks/dist/index.js"
The test is passing, but the input is becoming non-resizable.
Also it's fixing the problem with Select component. Idk how they are related, but it's being fixed too
I'm submitting a...
Current behavior
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
Expected behavior
To work
Minimal reproduction of the problem with instructions
// React
import React from 'react';
import { useState } from 'react';
// Vitest
import { describe, it } from 'vitest';
// Testing library
import '@testing-library/jest-dom/vitest';
import { render } from '@testing-library/react';
// Reablocks
import { ThemeProvider, theme, InlineInput } from 'reablocks';
const TestComponent = () => {
const [text, setText] = useState('');
return (
<div
style={{
border: 'var(--input-border)',
borderRadius: 'var(--border-radius-md)',
padding: 'var(--spacing-sm)'
}}
>
<InlineInput
value={text}
onChange={event => setText(event.target.value)}
placeholder="Type here..."
/>
;
);
};
describe('Test', () => {
it('Should render', () => {
// Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
render();
});
});
Environment
The text was updated successfully, but these errors were encountered: